Flexible Parallelism
On this page
SingleStore supports Flexible Parallelism, which allows multiple cores on the same node to access the same database partition.
With Flexible Parallelism, as database partitions are created, they are divided into sub-partitions.
As an example, if you are currently at one partition per core with Flexible Parallelism, doubling the size of your workspace and then rebalancing will result in two cores for each partition.
Typically, analytic or hybrid transactional/analytic workloads will gain some benefits from Flexible Parallelism, especially over time as you add more hardware and rebalance workspaces.
As you add cores to your SingleStore system, you can reach a point where you have more cores than database partitions on each leaf node.
Note
When Flexible Parallelism is enabled, all new databases created will use Flexible Parallelism.
Flexible Parallelism is enabled by default for new workspaces in SingleStore Helios with the following settings:
-
One physical partition per leaf core at database creation time
-
16 sub-partitions per physical partition
-
One thread per leaf core per query
If you’re an existing customer who began using SingleStore Helios before May 2022, and wish to have Flexible Parallelism enabled for new databases, contact Support.
Note
SingleStore recommends lowering parallelism by setting query_
for high-throughput search workloads.
The default setting query_
indicates a parallelism of one thread per core for each query.
Sub-segment Elimination
Sub-segment elimination improves performance by eliminating data at the sub-segment level during query processing and thus extends the performance improvements provided by segment elimination.
Segments consist of blocks of 4096 rows each.
A segment with the default size (columnstore_
) would have 1,024,000 / 4,096 = 250 sub-segments.
Consider a table and a query as follows:
CREATE TABLE sales(id INT, dt DATETIME, itemnum INT, qty FLOAT, price numeric(18,4), SORT KEY(dt));SELECT itemnum, SUM(qty*price)FROM salesWHERE dt BETWEEN "2024-09-20 17:00:00" AND "2024-09-20 17:01:00"GROUP BY all;
This query has a very narrow time range (a highly selective predicate) on the dt
column, and the dt
column is the sort key.
Last modified: November 5, 2024