Identifying parallel scans in SET EXPLAIN output
When PDQ is turned on, the SET EXPLAIN output shows whether
the optimizer chose parallel scans. If the optimizer chose parallel
scans, the output lists Parallel
. (If PDQ is turned
off, the output lists Serial
.)
If PDQ is turned on, the optimizer also indicates the maximum number
of threads that are required to answer the query. The # of
Secondary Threads
field in the SET EXPLAIN output indicates
the number of threads that are required in addition to your user session
thread. The total number of threads necessary is the number of secondary
threads plus 1.
The following example shows SET EXPLAIN output for a table with
fragmentation and PDQ priority set to
LOW
: SELECT * FROM t1 WHERE c1 > 20
Estimated Cost: 2
Estimated # of Rows Returned: 2
1) informix.t1: SEQUENTIAL SCAN (Parallel, fragments: 2)
Filters: informix.t1.c1 > 20
# of Secondary Threads = 1
The following example of partial SET EXPLAIN output shows a query
with a hash join between two fragmented tables and PDQ priority set
to
ON
. The query is marked with DYNAMIC HASH
JOIN
, and the table on which the hash is built is marked
with Build Outer
. QUERY:
------
SELECT h1.c1, h2.c1 FROM h1, h2 WHERE h1.c1 = h2.c1
Estimated Cost: 2
Estimated # of Rows Returned: 5
1) informix.h1: SEQUENTIAL SCAN (Parallel, fragments: ALL)
2) informix.h2: SEQUENTIAL SCAN (Parallel, fragments: ALL)
DYNAMIC HASH JOIN (Build Outer)
Dynamic Hash Filters: informix.h1.c1 = informix.h2.c1
# of Secondary Threads = 6
The following example of partial SET EXPLAIN output shows a table
with fragmentation, PDQ priority set to
LOW
, and
an index that was selected as the access plan: SELECT * FROM t1 WHERE c1 < 13
Estimated Cost: 2
Estimated # of Rows Returned: 1
1) informix.t1: INDEX PATH
(1) Index Keys: c1 (Parallel, fragments: ALL)
Upper Index Filter: informix.t1.c1 < 13
# of Secondary Threads = 3