mirror of https://github.com/citusdata/citus.git
Adds information to explain output when using citus.explain_distributed_queries=false (#7412)
Fixes https://github.com/citusdata/citus/issues/6490pull/7425/head^2
parent
51e607878b
commit
6cf6cf37fd
|
@ -197,9 +197,7 @@ CitusExplainScan(CustomScanState *node, List *ancestors, struct ExplainState *es
|
|||
|
||||
if (!ExplainDistributedQueries)
|
||||
{
|
||||
appendStringInfoSpaces(es->str, es->indent * 2);
|
||||
appendStringInfo(es->str, "explain statements for distributed queries ");
|
||||
appendStringInfo(es->str, "are not enabled\n");
|
||||
ExplainPropertyBool("citus.explain_distributed_queries", false, es);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ DEBUG: join prunable for intervals [0,2147483647] and [-2147483648,-1]
|
|||
QUERY PLAN
|
||||
---------------------------------------------------------------------
|
||||
Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(2 rows)
|
||||
|
||||
SET client_min_messages TO LOG;
|
||||
|
@ -96,7 +96,7 @@ LOG: join order: [ "lineitem" ][ local partition join "orders" ]
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF)
|
||||
|
@ -111,7 +111,7 @@ LOG: join order: [ "orders" ][ dual partition join "lineitem_hash" ]
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
-- Verify we handle local joins between two hash-partitioned tables.
|
||||
|
@ -123,7 +123,7 @@ LOG: join order: [ "orders_hash" ][ local partition join "lineitem_hash" ]
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
-- Validate that we can handle broadcast joins with hash-partitioned tables.
|
||||
|
@ -135,7 +135,7 @@ LOG: join order: [ "customer_hash" ][ reference join "nation" ]
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
-- Validate that we don't use a single-partition join method for a hash
|
||||
|
@ -148,7 +148,7 @@ LOG: join order: [ "orders" ][ dual partition join "lineitem" ][ dual partition
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
-- Validate that we don't chose a single-partition join method with a
|
||||
|
@ -161,7 +161,7 @@ LOG: join order: [ "orders" ][ dual partition join "customer_hash" ]
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
-- Validate that we can re-partition a hash partitioned table to join with a
|
||||
|
@ -174,7 +174,7 @@ LOG: join order: [ "orders_hash" ][ dual partition join "customer_append" ]
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
-- Validate a 4 way join that could be done locally is planned as such by the logical
|
||||
|
@ -199,7 +199,7 @@ LOG: join order: [ "users_table" ][ local partition join "events_table" ][ loca
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
-- Reset client logging level to its previous value
|
||||
|
|
|
@ -26,7 +26,7 @@ LOG: join order: [ "lineitem" ]
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
-- Query #3 from the TPC-H decision support benchmark
|
||||
|
@ -61,7 +61,7 @@ LOG: join order: [ "orders" ][ local partition join "lineitem" ][ dual partitio
|
|||
-> HashAggregate
|
||||
Group Key: remote_scan.l_orderkey, remote_scan.o_orderdate, remote_scan.o_shippriority
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(6 rows)
|
||||
|
||||
-- Query #10 from the TPC-H decision support benchmark
|
||||
|
@ -103,7 +103,7 @@ LOG: join order: [ "orders" ][ local partition join "lineitem" ][ dual partitio
|
|||
Sort
|
||||
Sort Key: remote_scan.revenue DESC
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(4 rows)
|
||||
|
||||
-- Query #19 from the TPC-H decision support benchmark (modified)
|
||||
|
@ -142,7 +142,7 @@ LOG: join order: [ "lineitem" ][ dual partition join "part_append" ]
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
-- Query to test multiple re-partition jobs in a single query
|
||||
|
@ -163,7 +163,7 @@ LOG: join order: [ "lineitem" ][ local partition join "orders" ][ dual partitio
|
|||
HashAggregate
|
||||
Group Key: remote_scan.l_partkey
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(4 rows)
|
||||
|
||||
-- Reset client logging level to its previous value
|
||||
|
|
|
@ -21,7 +21,7 @@ LOG: join order: [ "lineitem" ]
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
-- Query #3 from the TPC-H decision support benchmark
|
||||
|
@ -54,7 +54,7 @@ LOG: join order: [ "orders" ][ reference join "customer" ][ local partition joi
|
|||
Sort
|
||||
Sort Key: remote_scan.revenue DESC, remote_scan.o_orderdate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(4 rows)
|
||||
|
||||
-- Query #10 from the TPC-H decision support benchmark
|
||||
|
@ -98,7 +98,7 @@ LOG: join order: [ "orders" ][ reference join "customer" ][ reference join "nat
|
|||
-> HashAggregate
|
||||
Group Key: remote_scan.c_custkey, remote_scan.c_name, remote_scan.c_acctbal, remote_scan.c_phone, remote_scan.n_name, remote_scan.c_address, remote_scan.c_comment
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(6 rows)
|
||||
|
||||
-- Query #19 from the TPC-H decision support benchmark (modified)
|
||||
|
@ -137,7 +137,7 @@ LOG: join order: [ "lineitem" ][ reference join "part" ]
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
-- Reset client logging level to its previous value
|
||||
|
|
|
@ -108,7 +108,7 @@ DEBUG: join prunable for intervals [{BA1000U2AMO4ZGX,BZZXSP27F21T6},{CA1000U2AM
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF)
|
||||
|
@ -122,7 +122,7 @@ DEBUG: join prunable for intervals [(c,5,d),(d,6,e)] and [(a,3,b),(b,4,c)]
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
-- Test that large table joins on partition varchar columns work
|
||||
|
@ -137,7 +137,7 @@ DEBUG: join prunable for intervals [BA1000U2AMO4ZGX,BZZXSP27F21T6] and [AA1000U
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
SET client_min_messages TO WARNING;
|
||||
|
|
|
@ -79,7 +79,7 @@ DEBUG: assigned task to node localhost:xxxxx
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF) SELECT count(*) FROM task_assignment_test_table;
|
||||
|
@ -93,7 +93,7 @@ DEBUG: assigned task to node localhost:xxxxx
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
-- Next test the first-replica task assignment policy
|
||||
|
@ -109,7 +109,7 @@ DEBUG: assigned task to node localhost:xxxxx
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF) SELECT count(*) FROM task_assignment_test_table;
|
||||
|
@ -123,7 +123,7 @@ DEBUG: assigned task to node localhost:xxxxx
|
|||
---------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(3 rows)
|
||||
|
||||
COMMIT;
|
||||
|
@ -145,7 +145,7 @@ DEBUG: Creating router plan
|
|||
QUERY PLAN
|
||||
---------------------------------------------------------------------
|
||||
Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(2 rows)
|
||||
|
||||
EXPLAIN (COSTS FALSE) SELECT * FROM task_assignment_reference_table;
|
||||
|
@ -154,7 +154,7 @@ DEBUG: Creating router plan
|
|||
QUERY PLAN
|
||||
---------------------------------------------------------------------
|
||||
Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(2 rows)
|
||||
|
||||
SET LOCAL citus.task_assignment_policy TO 'first-replica';
|
||||
|
@ -164,7 +164,7 @@ DEBUG: Creating router plan
|
|||
QUERY PLAN
|
||||
---------------------------------------------------------------------
|
||||
Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(2 rows)
|
||||
|
||||
EXPLAIN (COSTS FALSE) SELECT * FROM task_assignment_reference_table;
|
||||
|
@ -173,7 +173,7 @@ DEBUG: Creating router plan
|
|||
QUERY PLAN
|
||||
---------------------------------------------------------------------
|
||||
Custom Scan (Citus Adaptive)
|
||||
explain statements for distributed queries are not enabled
|
||||
citus.explain_distributed_queries: false
|
||||
(2 rows)
|
||||
|
||||
ROLLBACK;
|
||||
|
|
Loading…
Reference in New Issue