SQL/MX Comparison Guide for SQL/MP Users
Optimizer and Executor
HP NonStop SQL/MX Comparison Guide for SQL/MP Users—523735-003
5-6
SQL/MX Task Model
The initial request from the join to the left scan queue must occur before the other
operations can begin. After the initial request is processed, both the left and right scans
can be processing information through their queues simultaneously.
The task model makes it easy to perform all internal operations asynchronously so that
a single server thread can have multiple I/Os outstanding. This model also allows
parallelism for both shared memory and distributed memory architectures. In-memory
queues are used for communication, while exchange operators are used for distributed
memory.
Parallelism
In NonStop SQL/MP, parallelism works only on a table that is already partitioned and
only for queries that retrieve data from multiple partitions. NonStop SQL/MX considers
partitioned parallelism in all cases. In addition, NonStop SQL/MX uses pipelined and
independent parallelism.
NonStop SQL/MP does not recognize multilevel parallelism. In NonStop SQL/MP,
either the entire query tree runs in parallel or none of it runs in parallel. NonStop
SQL/MX supports multilevel parallelism, which allows each operator to have a different
level or degree of parallelism, including none.
NonStop SQL/MP uses only ESP parallelism and needs one ESP per base table
partition. The number of ESPs in NonStop SQL/MX is determined more by the number
of available CPUs than it is by the number of partitions in the tables. If a table has
more partitions than available CPUs, the optimizer can group the partitions so that
each ESP processes multiple partitions as if they were a single partition. Each ESP will
group adjacent partitions.
NonStop SQL/MX can merge sorted parallel streams with some restrictions. For
example, a parallel merge join with an ORDER BY clause might not require a final sort.
In SQL/MP, multiple streams must be sorted.
For a full explanation of parallelism in NonStop SQL/MX, see the SQL/MX Query
Guide.
Join
Scan Scan
12 34