mirror of https://github.com/citusdata/citus.git
Update EXPLAIN output format from JSON to YAML in regression tests
parent
c600eabd82
commit
71075061b8
|
|
@ -364,9 +364,6 @@ s/(Actual[[:space:]]+Rows:[[:space:]]*)N\.N/\1N/gI
|
||||||
# ignore any “Disabled:” lines in test output
|
# ignore any “Disabled:” lines in test output
|
||||||
/^\s*Disabled:/d
|
/^\s*Disabled:/d
|
||||||
|
|
||||||
# ignore any JSON-style Disabled field
|
|
||||||
/^\s*"Disabled":/d
|
|
||||||
|
|
||||||
# ignore XML <Disabled>true</Disabled> or <Disabled>false</Disabled>
|
# ignore XML <Disabled>true</Disabled> or <Disabled>false</Disabled>
|
||||||
/^\s*<Disabled>.*<\/Disabled>/d
|
/^\s*<Disabled>.*<\/Disabled>/d
|
||||||
# pg18 “Disabled” change end
|
# pg18 “Disabled” change end
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,10 @@
|
||||||
-- https://github.com/postgres/postgres/commit/f4c7c410ee4a7baa06f51ebb8d5333c169691dd3
|
-- https://github.com/postgres/postgres/commit/f4c7c410ee4a7baa06f51ebb8d5333c169691dd3
|
||||||
-- The alternative output can be deleted when we drop support for PG15
|
-- The alternative output can be deleted when we drop support for PG15
|
||||||
--
|
--
|
||||||
|
-- This test file has an alternative output because of the following in PG18:
|
||||||
|
-- https://github.com/postgres/postgres/commit/161320b4b960ee4fe918959be6529ae9b106ea5a
|
||||||
|
-- The alternative output can be deleted when we drop support for PG17
|
||||||
|
--
|
||||||
SHOW server_version \gset
|
SHOW server_version \gset
|
||||||
SELECT substring(:'server_version', '\d+')::int >= 16 AS server_version_ge_16;
|
SELECT substring(:'server_version', '\d+')::int >= 16 AS server_version_ge_16;
|
||||||
server_version_ge_16
|
server_version_ge_16
|
||||||
|
|
@ -13,6 +17,12 @@ SELECT substring(:'server_version', '\d+')::int >= 16 AS server_version_ge_16;
|
||||||
t
|
t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
|
SELECT substring(:'server_version', '\d+')::int >= 18 AS server_version_ge_18;
|
||||||
|
server_version_ge_18
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
t
|
||||||
|
(1 row)
|
||||||
|
|
||||||
SET citus.next_shard_id TO 570000;
|
SET citus.next_shard_id TO 570000;
|
||||||
\a\t
|
\a\t
|
||||||
SET citus.explain_distributed_queries TO on;
|
SET citus.explain_distributed_queries TO on;
|
||||||
|
|
@ -111,6 +121,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Node Type": "Sort",
|
"Node Type": "Sort",
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
|
"Disabled": false,
|
||||||
"Sort Key": ["(COALESCE((pg_catalog.sum(remote_scan.count_quantity))::bigint, '0'::bigint))", "remote_scan.l_quantity"],
|
"Sort Key": ["(COALESCE((pg_catalog.sum(remote_scan.count_quantity))::bigint, '0'::bigint))", "remote_scan.l_quantity"],
|
||||||
"Plans": [
|
"Plans": [
|
||||||
{
|
{
|
||||||
|
|
@ -120,6 +131,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Parent Relationship": "Outer",
|
"Parent Relationship": "Outer",
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
|
"Disabled": false,
|
||||||
"Group Key": ["remote_scan.l_quantity"],
|
"Group Key": ["remote_scan.l_quantity"],
|
||||||
"Plans": [
|
"Plans": [
|
||||||
{
|
{
|
||||||
|
|
@ -128,6 +140,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Custom Plan Provider": "Citus Adaptive",
|
"Custom Plan Provider": "Citus Adaptive",
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
|
"Disabled": false,
|
||||||
"Distributed Query": {
|
"Distributed Query": {
|
||||||
"Job": {
|
"Job": {
|
||||||
"Task Count": 2,
|
"Task Count": 2,
|
||||||
|
|
@ -144,6 +157,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Partial Mode": "Simple",
|
"Partial Mode": "Simple",
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
|
"Disabled": false,
|
||||||
"Group Key": ["l_quantity"],
|
"Group Key": ["l_quantity"],
|
||||||
"Plans": [
|
"Plans": [
|
||||||
{
|
{
|
||||||
|
|
@ -152,7 +166,8 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
"Relation Name": "lineitem_360000",
|
"Relation Name": "lineitem_360000",
|
||||||
"Alias": "lineitem"
|
"Alias": "lineitem",
|
||||||
|
"Disabled": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -1184,6 +1199,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Partial Mode": "Simple",
|
"Partial Mode": "Simple",
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
|
"Disabled": false,
|
||||||
"Plans": [
|
"Plans": [
|
||||||
{
|
{
|
||||||
"Node Type": "Custom Scan",
|
"Node Type": "Custom Scan",
|
||||||
|
|
@ -1191,6 +1207,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Custom Plan Provider": "Citus Adaptive",
|
"Custom Plan Provider": "Citus Adaptive",
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
|
"Disabled": false,
|
||||||
"Distributed Query": {
|
"Distributed Query": {
|
||||||
"Job": {
|
"Job": {
|
||||||
"Task Count": 6,
|
"Task Count": 6,
|
||||||
|
|
@ -1744,8 +1761,9 @@ SELECT explain_analyze_output FROM worker_last_saved_explain_analyze();
|
||||||
"Node Type": "Result", +
|
"Node Type": "Result", +
|
||||||
"Parallel Aware": false,+
|
"Parallel Aware": false,+
|
||||||
"Async Capable": false, +
|
"Async Capable": false, +
|
||||||
"Actual Rows": 1, +
|
"Actual Rows": 1, +
|
||||||
"Actual Loops": 1 +
|
"Actual Loops": 1, +
|
||||||
|
"Disabled": false +
|
||||||
}, +
|
}, +
|
||||||
"Triggers": [ +
|
"Triggers": [ +
|
||||||
] +
|
] +
|
||||||
|
|
@ -2170,108 +2188,69 @@ SELECT * FROM explain_pk ORDER BY 1;
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
-- test EXPLAIN ANALYZE with non-text output formats
|
-- test EXPLAIN ANALYZE with non-text output formats
|
||||||
BEGIN;
|
BEGIN;
|
||||||
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT JSON, BUFFERS OFF) INSERT INTO explain_pk VALUES (1, 2), (2, 3);
|
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT YAML, BUFFERS OFF) INSERT INTO explain_pk VALUES (1, 2), (2, 3);
|
||||||
[
|
- Plan:
|
||||||
{
|
Node Type: "Custom Scan"
|
||||||
"Plan": {
|
Custom Plan Provider: "Citus Adaptive"
|
||||||
"Node Type": "Custom Scan",
|
Parallel Aware: false
|
||||||
"Custom Plan Provider": "Citus Adaptive",
|
Async Capable: false
|
||||||
"Parallel Aware": false,
|
Actual Rows: 0
|
||||||
"Async Capable": false,
|
Actual Loops: 1
|
||||||
"Actual Rows": 0,
|
Distributed Query:
|
||||||
"Actual Loops": 1,
|
Job:
|
||||||
"Distributed Query": {
|
Task Count: 2
|
||||||
"Job": {
|
Tasks Shown: "One of 2"
|
||||||
"Task Count": 2,
|
Tasks:
|
||||||
"Tasks Shown": "One of 2",
|
- Node: "host=localhost port=xxxxx dbname=regression"
|
||||||
"Tasks": [
|
Remote Plan:
|
||||||
{
|
- Plan:
|
||||||
"Node": "host=localhost port=xxxxx dbname=regression",
|
Node Type: "ModifyTable"
|
||||||
"Remote Plan": [
|
Operation: "Insert"
|
||||||
[
|
Parallel Aware: false
|
||||||
{
|
Async Capable: false
|
||||||
"Plan": {
|
Relation Name: "explain_pk_570013"
|
||||||
"Node Type": "ModifyTable",
|
Alias: "citus_table_alias"
|
||||||
"Operation": "Insert",
|
Actual Rows: 0
|
||||||
"Parallel Aware": false,
|
Actual Loops: 1
|
||||||
"Async Capable": false,
|
Plans:
|
||||||
"Relation Name": "explain_pk_570013",
|
- Node Type: "Result"
|
||||||
"Alias": "citus_table_alias",
|
Parent Relationship: "Outer"
|
||||||
"Actual Rows": 0,
|
Parallel Aware: false
|
||||||
"Actual Loops": 1,
|
Async Capable: false
|
||||||
"Plans": [
|
Actual Rows: 1
|
||||||
{
|
Actual Loops: 1
|
||||||
"Node Type": "Result",
|
Triggers:
|
||||||
"Parent Relationship": "Outer",
|
|
||||||
"Parallel Aware": false,
|
|
||||||
"Async Capable": false,
|
|
||||||
"Actual Rows": 1,
|
|
||||||
"Actual Loops": 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"Triggers": [
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
]
|
Triggers:
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Triggers": [
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT JSON, BUFFERS OFF) SELECT * FROM explain_pk;
|
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT YAML, BUFFERS OFF) SELECT * FROM explain_pk;
|
||||||
[
|
- Plan:
|
||||||
{
|
Node Type: "Custom Scan"
|
||||||
"Plan": {
|
Custom Plan Provider: "Citus Adaptive"
|
||||||
"Node Type": "Custom Scan",
|
Parallel Aware: false
|
||||||
"Custom Plan Provider": "Citus Adaptive",
|
Async Capable: false
|
||||||
"Parallel Aware": false,
|
Actual Rows: 0
|
||||||
"Async Capable": false,
|
Actual Loops: 1
|
||||||
"Actual Rows": 0,
|
Distributed Query:
|
||||||
"Actual Loops": 1,
|
Job:
|
||||||
"Distributed Query": {
|
Task Count: 4
|
||||||
"Job": {
|
Tuple data received from nodes: "0 bytes"
|
||||||
"Task Count": 4,
|
Tasks Shown: "One of 4"
|
||||||
"Tuple data received from nodes": "0 bytes",
|
Tasks:
|
||||||
"Tasks Shown": "One of 4",
|
- Tuple data received from node: "0 bytes"
|
||||||
"Tasks": [
|
Node: "host=localhost port=xxxxx dbname=regression"
|
||||||
{
|
Remote Plan:
|
||||||
"Tuple data received from node": "0 bytes",
|
- Plan:
|
||||||
"Node": "host=localhost port=xxxxx dbname=regression",
|
Node Type: "Seq Scan"
|
||||||
"Remote Plan": [
|
Parallel Aware: false
|
||||||
[
|
Async Capable: false
|
||||||
{
|
Relation Name: "explain_pk_570013"
|
||||||
"Plan": {
|
Alias: "explain_pk"
|
||||||
"Node Type": "Seq Scan",
|
Actual Rows: 0
|
||||||
"Parallel Aware": false,
|
Actual Loops: 1
|
||||||
"Async Capable": false,
|
Triggers:
|
||||||
"Relation Name": "explain_pk_570013",
|
|
||||||
"Alias": "explain_pk",
|
|
||||||
"Actual Rows": 0,
|
|
||||||
"Actual Loops": 1
|
|
||||||
},
|
|
||||||
"Triggers": [
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
]
|
Triggers:
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Triggers": [
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT XML, BUFFERS OFF) INSERT INTO explain_pk VALUES (1, 2), (2, 3);
|
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT XML, BUFFERS OFF) INSERT INTO explain_pk VALUES (1, 2), (2, 3);
|
||||||
<explain xmlns="http://www.postgresql.org/2009/explain">
|
<explain xmlns="http://www.postgresql.org/2009/explain">
|
||||||
|
|
@ -3286,6 +3265,7 @@ SELECT * FROM a;
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
"Actual Rows": 1,
|
"Actual Rows": 1,
|
||||||
"Actual Loops": 1,
|
"Actual Loops": 1,
|
||||||
|
"Disabled": false,
|
||||||
"Distributed Query": {
|
"Distributed Query": {
|
||||||
"Subplans": [
|
"Subplans": [
|
||||||
{
|
{
|
||||||
|
|
@ -3300,6 +3280,7 @@ SELECT * FROM a;
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
"Actual Rows": 1,
|
"Actual Rows": 1,
|
||||||
"Actual Loops": 1,
|
"Actual Loops": 1,
|
||||||
|
"Disabled": false,
|
||||||
"Distributed Query": {
|
"Distributed Query": {
|
||||||
"Job": {
|
"Job": {
|
||||||
"Task Count": 1,
|
"Task Count": 1,
|
||||||
|
|
@ -3321,6 +3302,7 @@ SELECT * FROM a;
|
||||||
"Alias": "test_subplans_570038",
|
"Alias": "test_subplans_570038",
|
||||||
"Actual Rows": 1,
|
"Actual Rows": 1,
|
||||||
"Actual Loops": 1,
|
"Actual Loops": 1,
|
||||||
|
"Disabled": false,
|
||||||
"Plans": [
|
"Plans": [
|
||||||
{
|
{
|
||||||
"Node Type": "Result",
|
"Node Type": "Result",
|
||||||
|
|
@ -3328,7 +3310,8 @@ SELECT * FROM a;
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
"Actual Rows": 1,
|
"Actual Rows": 1,
|
||||||
"Actual Loops": 1
|
"Actual Loops": 1,
|
||||||
|
"Disabled": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -3367,7 +3350,8 @@ SELECT * FROM a;
|
||||||
"Function Name": "read_intermediate_result",
|
"Function Name": "read_intermediate_result",
|
||||||
"Alias": "intermediate_result",
|
"Alias": "intermediate_result",
|
||||||
"Actual Rows": 1,
|
"Actual Rows": 1,
|
||||||
"Actual Loops": 1
|
"Actual Loops": 1,
|
||||||
|
"Disabled": false
|
||||||
},
|
},
|
||||||
"Triggers": [
|
"Triggers": [
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,19 @@
|
||||||
-- https://github.com/postgres/postgres/commit/f4c7c410ee4a7baa06f51ebb8d5333c169691dd3
|
-- https://github.com/postgres/postgres/commit/f4c7c410ee4a7baa06f51ebb8d5333c169691dd3
|
||||||
-- The alternative output can be deleted when we drop support for PG15
|
-- The alternative output can be deleted when we drop support for PG15
|
||||||
--
|
--
|
||||||
|
-- This test file has an alternative output because of the following in PG18:
|
||||||
|
-- https://github.com/postgres/postgres/commit/161320b4b960ee4fe918959be6529ae9b106ea5a
|
||||||
|
-- The alternative output can be deleted when we drop support for PG17
|
||||||
|
--
|
||||||
SHOW server_version \gset
|
SHOW server_version \gset
|
||||||
SELECT substring(:'server_version', '\d+')::int >= 16 AS server_version_ge_16;
|
SELECT substring(:'server_version', '\d+')::int >= 16 AS server_version_ge_16;
|
||||||
server_version_ge_16
|
server_version_ge_16
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
t
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT substring(:'server_version', '\d+')::int >= 18 AS server_version_ge_18;
|
||||||
|
server_version_ge_18
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
f
|
f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
@ -665,7 +675,7 @@ Aggregate
|
||||||
-> GroupAggregate
|
-> GroupAggregate
|
||||||
Group Key: ((users.composite_id).tenant_id), ((users.composite_id).user_id)
|
Group Key: ((users.composite_id).tenant_id), ((users.composite_id).user_id)
|
||||||
-> Sort
|
-> Sort
|
||||||
Sort Key: ((users.composite_id).tenant_id), ((users.composite_id).user_id)
|
Sort Key: ((users.composite_id).tenant_id), ((users.composite_id).user_id), events.event_time
|
||||||
-> Hash Join
|
-> Hash Join
|
||||||
Hash Cond: (users.composite_id = events.composite_id)
|
Hash Cond: (users.composite_id = events.composite_id)
|
||||||
-> Seq Scan on users_1400289 users
|
-> Seq Scan on users_1400289 users
|
||||||
|
|
@ -757,7 +767,7 @@ HashAggregate
|
||||||
-> GroupAggregate
|
-> GroupAggregate
|
||||||
Group Key: ((users.composite_id).tenant_id), ((users.composite_id).user_id), subquery_2.hasdone
|
Group Key: ((users.composite_id).tenant_id), ((users.composite_id).user_id), subquery_2.hasdone
|
||||||
-> Sort
|
-> Sort
|
||||||
Sort Key: ((users.composite_id).tenant_id), ((users.composite_id).user_id), subquery_2.hasdone
|
Sort Key: ((users.composite_id).tenant_id), ((users.composite_id).user_id), subquery_2.hasdone, events.event_time
|
||||||
-> Hash Left Join
|
-> Hash Left Join
|
||||||
Hash Cond: (users.composite_id = subquery_2.composite_id)
|
Hash Cond: (users.composite_id = subquery_2.composite_id)
|
||||||
-> HashAggregate
|
-> HashAggregate
|
||||||
|
|
@ -870,7 +880,7 @@ Sort
|
||||||
Group Key: ((users.composite_id).tenant_id), ((users.composite_id).user_id), subquery_2.count_pay
|
Group Key: ((users.composite_id).tenant_id), ((users.composite_id).user_id), subquery_2.count_pay
|
||||||
Filter: (array_ndims(array_agg(('action=>1'::text) ORDER BY events.event_time)) > 0)
|
Filter: (array_ndims(array_agg(('action=>1'::text) ORDER BY events.event_time)) > 0)
|
||||||
-> Sort
|
-> Sort
|
||||||
Sort Key: ((users.composite_id).tenant_id), ((users.composite_id).user_id), subquery_2.count_pay
|
Sort Key: ((users.composite_id).tenant_id), ((users.composite_id).user_id), subquery_2.count_pay, events.event_time
|
||||||
-> Hash Left Join
|
-> Hash Left Join
|
||||||
Hash Cond: (users.composite_id = subquery_2.composite_id)
|
Hash Cond: (users.composite_id = subquery_2.composite_id)
|
||||||
-> HashAggregate
|
-> HashAggregate
|
||||||
|
|
@ -975,7 +985,7 @@ Limit
|
||||||
-> GroupAggregate
|
-> GroupAggregate
|
||||||
Group Key: ((users.composite_id).tenant_id), ((users.composite_id).user_id)
|
Group Key: ((users.composite_id).tenant_id), ((users.composite_id).user_id)
|
||||||
-> Sort
|
-> Sort
|
||||||
Sort Key: ((users.composite_id).tenant_id), ((users.composite_id).user_id)
|
Sort Key: ((users.composite_id).tenant_id), ((users.composite_id).user_id), events.event_time
|
||||||
-> Nested Loop Left Join
|
-> Nested Loop Left Join
|
||||||
-> Limit
|
-> Limit
|
||||||
-> Sort
|
-> Sort
|
||||||
|
|
@ -2170,108 +2180,69 @@ SELECT * FROM explain_pk ORDER BY 1;
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
-- test EXPLAIN ANALYZE with non-text output formats
|
-- test EXPLAIN ANALYZE with non-text output formats
|
||||||
BEGIN;
|
BEGIN;
|
||||||
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT JSON, BUFFERS OFF) INSERT INTO explain_pk VALUES (1, 2), (2, 3);
|
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT YAML, BUFFERS OFF) INSERT INTO explain_pk VALUES (1, 2), (2, 3);
|
||||||
[
|
- Plan:
|
||||||
{
|
Node Type: "Custom Scan"
|
||||||
"Plan": {
|
Custom Plan Provider: "Citus Adaptive"
|
||||||
"Node Type": "Custom Scan",
|
Parallel Aware: false
|
||||||
"Custom Plan Provider": "Citus Adaptive",
|
Async Capable: false
|
||||||
"Parallel Aware": false,
|
Actual Rows: 0
|
||||||
"Async Capable": false,
|
Actual Loops: 1
|
||||||
"Actual Rows": 0,
|
Distributed Query:
|
||||||
"Actual Loops": 1,
|
Job:
|
||||||
"Distributed Query": {
|
Task Count: 2
|
||||||
"Job": {
|
Tasks Shown: "One of 2"
|
||||||
"Task Count": 2,
|
Tasks:
|
||||||
"Tasks Shown": "One of 2",
|
- Node: "host=localhost port=xxxxx dbname=regression"
|
||||||
"Tasks": [
|
Remote Plan:
|
||||||
{
|
- Plan:
|
||||||
"Node": "host=localhost port=xxxxx dbname=regression",
|
Node Type: "ModifyTable"
|
||||||
"Remote Plan": [
|
Operation: "Insert"
|
||||||
[
|
Parallel Aware: false
|
||||||
{
|
Async Capable: false
|
||||||
"Plan": {
|
Relation Name: "explain_pk_570013"
|
||||||
"Node Type": "ModifyTable",
|
Alias: "citus_table_alias"
|
||||||
"Operation": "Insert",
|
Actual Rows: 0
|
||||||
"Parallel Aware": false,
|
Actual Loops: 1
|
||||||
"Async Capable": false,
|
Plans:
|
||||||
"Relation Name": "explain_pk_570013",
|
- Node Type: "Result"
|
||||||
"Alias": "citus_table_alias",
|
Parent Relationship: "Outer"
|
||||||
"Actual Rows": 0,
|
Parallel Aware: false
|
||||||
"Actual Loops": 1,
|
Async Capable: false
|
||||||
"Plans": [
|
Actual Rows: 1
|
||||||
{
|
Actual Loops: 1
|
||||||
"Node Type": "Result",
|
Triggers:
|
||||||
"Parent Relationship": "Outer",
|
|
||||||
"Parallel Aware": false,
|
|
||||||
"Async Capable": false,
|
|
||||||
"Actual Rows": 1,
|
|
||||||
"Actual Loops": 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"Triggers": [
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
]
|
Triggers:
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Triggers": [
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT JSON, BUFFERS OFF) SELECT * FROM explain_pk;
|
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT YAML, BUFFERS OFF) SELECT * FROM explain_pk;
|
||||||
[
|
- Plan:
|
||||||
{
|
Node Type: "Custom Scan"
|
||||||
"Plan": {
|
Custom Plan Provider: "Citus Adaptive"
|
||||||
"Node Type": "Custom Scan",
|
Parallel Aware: false
|
||||||
"Custom Plan Provider": "Citus Adaptive",
|
Async Capable: false
|
||||||
"Parallel Aware": false,
|
Actual Rows: 0
|
||||||
"Async Capable": false,
|
Actual Loops: 1
|
||||||
"Actual Rows": 0,
|
Distributed Query:
|
||||||
"Actual Loops": 1,
|
Job:
|
||||||
"Distributed Query": {
|
Task Count: 4
|
||||||
"Job": {
|
Tuple data received from nodes: "0 bytes"
|
||||||
"Task Count": 4,
|
Tasks Shown: "One of 4"
|
||||||
"Tuple data received from nodes": "0 bytes",
|
Tasks:
|
||||||
"Tasks Shown": "One of 4",
|
- Tuple data received from node: "0 bytes"
|
||||||
"Tasks": [
|
Node: "host=localhost port=xxxxx dbname=regression"
|
||||||
{
|
Remote Plan:
|
||||||
"Tuple data received from node": "0 bytes",
|
- Plan:
|
||||||
"Node": "host=localhost port=xxxxx dbname=regression",
|
Node Type: "Seq Scan"
|
||||||
"Remote Plan": [
|
Parallel Aware: false
|
||||||
[
|
Async Capable: false
|
||||||
{
|
Relation Name: "explain_pk_570013"
|
||||||
"Plan": {
|
Alias: "explain_pk"
|
||||||
"Node Type": "Seq Scan",
|
Actual Rows: 0
|
||||||
"Parallel Aware": false,
|
Actual Loops: 1
|
||||||
"Async Capable": false,
|
Triggers:
|
||||||
"Relation Name": "explain_pk_570013",
|
|
||||||
"Alias": "explain_pk",
|
|
||||||
"Actual Rows": 0,
|
|
||||||
"Actual Loops": 1
|
|
||||||
},
|
|
||||||
"Triggers": [
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
]
|
Triggers:
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Triggers": [
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT XML, BUFFERS OFF) INSERT INTO explain_pk VALUES (1, 2), (2, 3);
|
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT XML, BUFFERS OFF) INSERT INTO explain_pk VALUES (1, 2), (2, 3);
|
||||||
<explain xmlns="http://www.postgresql.org/2009/explain">
|
<explain xmlns="http://www.postgresql.org/2009/explain">
|
||||||
|
|
@ -2407,11 +2378,16 @@ Custom Scan (Citus Adaptive) (actual rows=1 loops=1)
|
||||||
Tuple data received from node: 8 bytes
|
Tuple data received from node: 8 bytes
|
||||||
Node: host=localhost port=xxxxx dbname=regression
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
-> Aggregate (actual rows=1 loops=1)
|
-> Aggregate (actual rows=1 loops=1)
|
||||||
-> Hash Join (actual rows=10 loops=1)
|
-> Merge Join (actual rows=10 loops=1)
|
||||||
Hash Cond: (ref_table.a = intermediate_result.a)
|
Merge Cond: (intermediate_result.a = ref_table.a)
|
||||||
-> Seq Scan on ref_table_570021 ref_table (actual rows=10 loops=1)
|
-> Sort (actual rows=10 loops=1)
|
||||||
-> Hash (actual rows=10 loops=1)
|
Sort Key: intermediate_result.a
|
||||||
|
Sort Method: quicksort Memory: 25kB
|
||||||
-> Function Scan on read_intermediate_result intermediate_result (actual rows=10 loops=1)
|
-> Function Scan on read_intermediate_result intermediate_result (actual rows=10 loops=1)
|
||||||
|
-> Sort (actual rows=10 loops=1)
|
||||||
|
Sort Key: ref_table.a
|
||||||
|
Sort Method: quicksort Memory: 25kB
|
||||||
|
-> Seq Scan on ref_table_570021 ref_table (actual rows=10 loops=1)
|
||||||
EXPLAIN :default_analyze_flags
|
EXPLAIN :default_analyze_flags
|
||||||
SELECT count(distinct a) FROM (SELECT GREATEST(random(), 2) r, a FROM dist_table) t NATURAL JOIN ref_table;
|
SELECT count(distinct a) FROM (SELECT GREATEST(random(), 2) r, a FROM dist_table) t NATURAL JOIN ref_table;
|
||||||
Aggregate (actual rows=1 loops=1)
|
Aggregate (actual rows=1 loops=1)
|
||||||
|
|
@ -2470,9 +2446,12 @@ Aggregate (actual rows=1 loops=1)
|
||||||
-> Aggregate (actual rows=1 loops=1)
|
-> Aggregate (actual rows=1 loops=1)
|
||||||
InitPlan 1
|
InitPlan 1
|
||||||
-> Function Scan on read_intermediate_result intermediate_result (actual rows=1 loops=1)
|
-> Function Scan on read_intermediate_result intermediate_result (actual rows=1 loops=1)
|
||||||
-> Result (actual rows=4 loops=1)
|
-> Sort (actual rows=4 loops=1)
|
||||||
One-Time Filter: (InitPlan 1).col1
|
Sort Key: dist_table.a
|
||||||
-> Seq Scan on dist_table_570017 dist_table (actual rows=4 loops=1)
|
Sort Method: quicksort Memory: 25kB
|
||||||
|
-> Result (actual rows=4 loops=1)
|
||||||
|
One-Time Filter: (InitPlan 1).col1
|
||||||
|
-> Seq Scan on dist_table_570017 dist_table (actual rows=4 loops=1)
|
||||||
BEGIN;
|
BEGIN;
|
||||||
EXPLAIN :default_analyze_flags
|
EXPLAIN :default_analyze_flags
|
||||||
WITH r AS (
|
WITH r AS (
|
||||||
|
|
@ -2514,7 +2493,10 @@ Custom Scan (Citus Adaptive) (actual rows=1 loops=1)
|
||||||
Tuple data received from node: 8 bytes
|
Tuple data received from node: 8 bytes
|
||||||
Node: host=localhost port=xxxxx dbname=regression
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
-> Aggregate (actual rows=1 loops=1)
|
-> Aggregate (actual rows=1 loops=1)
|
||||||
-> Function Scan on read_intermediate_result intermediate_result (actual rows=10 loops=1)
|
-> Sort (actual rows=10 loops=1)
|
||||||
|
Sort Key: intermediate_result.a2
|
||||||
|
Sort Method: quicksort Memory: 25kB
|
||||||
|
-> Function Scan on read_intermediate_result intermediate_result (actual rows=10 loops=1)
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
-- https://github.com/citusdata/citus/issues/4074
|
-- https://github.com/citusdata/citus/issues/4074
|
||||||
prepare ref_select(int) AS select * from ref_table where 1 = $1;
|
prepare ref_select(int) AS select * from ref_table where 1 = $1;
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -86,6 +86,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Node Type": "Sort",
|
"Node Type": "Sort",
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
|
"Disabled": false,
|
||||||
"Sort Key": ["(COALESCE((pg_catalog.sum(remote_scan.count_quantity))::bigint, '0'::bigint))", "remote_scan.l_quantity"],
|
"Sort Key": ["(COALESCE((pg_catalog.sum(remote_scan.count_quantity))::bigint, '0'::bigint))", "remote_scan.l_quantity"],
|
||||||
"Plans": [
|
"Plans": [
|
||||||
{
|
{
|
||||||
|
|
@ -95,6 +96,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Parent Relationship": "Outer",
|
"Parent Relationship": "Outer",
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
|
"Disabled": false,
|
||||||
"Group Key": ["remote_scan.l_quantity"],
|
"Group Key": ["remote_scan.l_quantity"],
|
||||||
"Plans": [
|
"Plans": [
|
||||||
{
|
{
|
||||||
|
|
@ -103,6 +105,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Custom Plan Provider": "Citus Adaptive",
|
"Custom Plan Provider": "Citus Adaptive",
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
|
"Disabled": false,
|
||||||
"Distributed Query": {
|
"Distributed Query": {
|
||||||
"Job": {
|
"Job": {
|
||||||
"Task Count": 16,
|
"Task Count": 16,
|
||||||
|
|
@ -119,6 +122,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Partial Mode": "Simple",
|
"Partial Mode": "Simple",
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
|
"Disabled": false,
|
||||||
"Group Key": ["l_quantity"],
|
"Group Key": ["l_quantity"],
|
||||||
"Plans": [
|
"Plans": [
|
||||||
{
|
{
|
||||||
|
|
@ -127,7 +131,8 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
"Relation Name": "lineitem_mx_1220052",
|
"Relation Name": "lineitem_mx_1220052",
|
||||||
"Alias": "lineitem_mx"
|
"Alias": "lineitem_mx",
|
||||||
|
"Disabled": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -553,6 +558,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Partial Mode": "Simple",
|
"Partial Mode": "Simple",
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
|
"Disabled": false,
|
||||||
"Plans": [
|
"Plans": [
|
||||||
{
|
{
|
||||||
"Node Type": "Custom Scan",
|
"Node Type": "Custom Scan",
|
||||||
|
|
@ -560,6 +566,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Custom Plan Provider": "Citus Adaptive",
|
"Custom Plan Provider": "Citus Adaptive",
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
|
"Disabled": false,
|
||||||
"Distributed Query": {
|
"Distributed Query": {
|
||||||
"Job": {
|
"Job": {
|
||||||
"Task Count": 16,
|
"Task Count": 16,
|
||||||
|
|
@ -576,6 +583,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Partial Mode": "Simple",
|
"Partial Mode": "Simple",
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
|
"Disabled": false,
|
||||||
"Plans": [
|
"Plans": [
|
||||||
{
|
{
|
||||||
"Node Type": "Hash Join",
|
"Node Type": "Hash Join",
|
||||||
|
|
@ -583,6 +591,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
"Join Type": "Inner",
|
"Join Type": "Inner",
|
||||||
|
"Disabled": false,
|
||||||
"Inner Unique": false,
|
"Inner Unique": false,
|
||||||
"Hash Cond": "(lineitem_mx.l_orderkey = orders_mx.o_orderkey)",
|
"Hash Cond": "(lineitem_mx.l_orderkey = orders_mx.o_orderkey)",
|
||||||
"Plans": [
|
"Plans": [
|
||||||
|
|
@ -592,6 +601,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
"Join Type": "Inner",
|
"Join Type": "Inner",
|
||||||
|
"Disabled": false,
|
||||||
"Inner Unique": false,
|
"Inner Unique": false,
|
||||||
"Hash Cond": "(supplier_mx.s_suppkey = lineitem_mx.l_suppkey)",
|
"Hash Cond": "(supplier_mx.s_suppkey = lineitem_mx.l_suppkey)",
|
||||||
"Plans": [
|
"Plans": [
|
||||||
|
|
@ -601,13 +611,15 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
"Relation Name": "supplier_mx_1220087",
|
"Relation Name": "supplier_mx_1220087",
|
||||||
"Alias": "supplier_mx"
|
"Alias": "supplier_mx",
|
||||||
|
"Disabled": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Node Type": "Hash",
|
"Node Type": "Hash",
|
||||||
"Parent Relationship": "Inner",
|
"Parent Relationship": "Inner",
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
|
"Disabled": false,
|
||||||
"Plans": [
|
"Plans": [
|
||||||
{
|
{
|
||||||
"Node Type": "Seq Scan",
|
"Node Type": "Seq Scan",
|
||||||
|
|
@ -615,7 +627,8 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
"Relation Name": "lineitem_mx_1220052",
|
"Relation Name": "lineitem_mx_1220052",
|
||||||
"Alias": "lineitem_mx"
|
"Alias": "lineitem_mx",
|
||||||
|
"Disabled": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -626,6 +639,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Parent Relationship": "Inner",
|
"Parent Relationship": "Inner",
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
|
"Disabled": false,
|
||||||
"Plans": [
|
"Plans": [
|
||||||
{
|
{
|
||||||
"Node Type": "Hash Join",
|
"Node Type": "Hash Join",
|
||||||
|
|
@ -633,6 +647,7 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
"Join Type": "Inner",
|
"Join Type": "Inner",
|
||||||
|
"Disabled": false,
|
||||||
"Inner Unique": false,
|
"Inner Unique": false,
|
||||||
"Hash Cond": "(customer_mx.c_custkey = orders_mx.o_custkey)",
|
"Hash Cond": "(customer_mx.c_custkey = orders_mx.o_custkey)",
|
||||||
"Plans": [
|
"Plans": [
|
||||||
|
|
@ -642,13 +657,15 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
"Relation Name": "customer_mx_1220084",
|
"Relation Name": "customer_mx_1220084",
|
||||||
"Alias": "customer_mx"
|
"Alias": "customer_mx",
|
||||||
|
"Disabled": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Node Type": "Hash",
|
"Node Type": "Hash",
|
||||||
"Parent Relationship": "Inner",
|
"Parent Relationship": "Inner",
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
|
"Disabled": false,
|
||||||
"Plans": [
|
"Plans": [
|
||||||
{
|
{
|
||||||
"Node Type": "Seq Scan",
|
"Node Type": "Seq Scan",
|
||||||
|
|
@ -656,7 +673,8 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
"Parallel Aware": false,
|
"Parallel Aware": false,
|
||||||
"Async Capable": false,
|
"Async Capable": false,
|
||||||
"Relation Name": "orders_mx_1220068",
|
"Relation Name": "orders_mx_1220068",
|
||||||
"Alias": "orders_mx"
|
"Alias": "orders_mx",
|
||||||
|
"Disabled": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,934 @@
|
||||||
|
--
|
||||||
|
-- MULTI_MX_EXPLAIN
|
||||||
|
--
|
||||||
|
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 1320000;
|
||||||
|
\c - - - :worker_1_port
|
||||||
|
\c - - - :worker_2_port
|
||||||
|
\c - - - :master_port
|
||||||
|
\a\t
|
||||||
|
SET citus.explain_distributed_queries TO on;
|
||||||
|
VACUUM ANALYZE lineitem_mx;
|
||||||
|
VACUUM ANALYZE orders_mx;
|
||||||
|
VACUUM ANALYZE customer_mx;
|
||||||
|
VACUUM ANALYZE supplier_mx;
|
||||||
|
\c - - - :worker_1_port
|
||||||
|
-- Function that parses explain output as JSON
|
||||||
|
SET citus.enable_metadata_sync TO OFF;
|
||||||
|
CREATE FUNCTION explain_json(query text)
|
||||||
|
RETURNS jsonb
|
||||||
|
AS $BODY$
|
||||||
|
DECLARE
|
||||||
|
result jsonb;
|
||||||
|
BEGIN
|
||||||
|
EXECUTE format('EXPLAIN (FORMAT JSON) %s', query) INTO result;
|
||||||
|
RETURN result;
|
||||||
|
END;
|
||||||
|
$BODY$ LANGUAGE plpgsql;
|
||||||
|
-- Function that parses explain output as XML
|
||||||
|
CREATE FUNCTION explain_xml(query text)
|
||||||
|
RETURNS xml
|
||||||
|
AS $BODY$
|
||||||
|
DECLARE
|
||||||
|
result xml;
|
||||||
|
BEGIN
|
||||||
|
EXECUTE format('EXPLAIN (FORMAT XML) %s', query) INTO result;
|
||||||
|
RETURN result;
|
||||||
|
END;
|
||||||
|
$BODY$ LANGUAGE plpgsql;
|
||||||
|
\c - - - :worker_2_port
|
||||||
|
-- Function that parses explain output as JSON
|
||||||
|
SET citus.enable_metadata_sync TO OFF;
|
||||||
|
CREATE FUNCTION explain_json(query text)
|
||||||
|
RETURNS jsonb
|
||||||
|
AS $BODY$
|
||||||
|
DECLARE
|
||||||
|
result jsonb;
|
||||||
|
BEGIN
|
||||||
|
EXECUTE format('EXPLAIN (FORMAT JSON) %s', query) INTO result;
|
||||||
|
RETURN result;
|
||||||
|
END;
|
||||||
|
$BODY$ LANGUAGE plpgsql;
|
||||||
|
-- Function that parses explain output as XML
|
||||||
|
CREATE FUNCTION explain_xml(query text)
|
||||||
|
RETURNS xml
|
||||||
|
AS $BODY$
|
||||||
|
DECLARE
|
||||||
|
result xml;
|
||||||
|
BEGIN
|
||||||
|
EXECUTE format('EXPLAIN (FORMAT XML) %s', query) INTO result;
|
||||||
|
RETURN result;
|
||||||
|
END;
|
||||||
|
$BODY$ LANGUAGE plpgsql;
|
||||||
|
RESET citus.enable_metadata_sync;
|
||||||
|
-- Test Text format
|
||||||
|
EXPLAIN (COSTS FALSE, FORMAT TEXT)
|
||||||
|
SELECT l_quantity, count(*) count_quantity FROM lineitem_mx
|
||||||
|
GROUP BY l_quantity ORDER BY count_quantity, l_quantity;
|
||||||
|
Sort
|
||||||
|
Sort Key: (COALESCE((pg_catalog.sum(remote_scan.count_quantity))::bigint, '0'::bigint)), remote_scan.l_quantity
|
||||||
|
-> HashAggregate
|
||||||
|
Group Key: remote_scan.l_quantity
|
||||||
|
-> Custom Scan (Citus Adaptive)
|
||||||
|
Task Count: 16
|
||||||
|
Tasks Shown: One of 16
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> HashAggregate
|
||||||
|
Group Key: l_quantity
|
||||||
|
-> Seq Scan on lineitem_mx_1220052 lineitem_mx
|
||||||
|
-- Test JSON format
|
||||||
|
EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
|
SELECT l_quantity, count(*) count_quantity FROM lineitem_mx
|
||||||
|
GROUP BY l_quantity ORDER BY count_quantity, l_quantity;
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Plan": {
|
||||||
|
"Node Type": "Sort",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Sort Key": ["(COALESCE((pg_catalog.sum(remote_scan.count_quantity))::bigint, '0'::bigint))", "remote_scan.l_quantity"],
|
||||||
|
"Plans": [
|
||||||
|
{
|
||||||
|
"Node Type": "Aggregate",
|
||||||
|
"Strategy": "Hashed",
|
||||||
|
"Partial Mode": "Simple",
|
||||||
|
"Parent Relationship": "Outer",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Group Key": ["remote_scan.l_quantity"],
|
||||||
|
"Plans": [
|
||||||
|
{
|
||||||
|
"Node Type": "Custom Scan",
|
||||||
|
"Parent Relationship": "Outer",
|
||||||
|
"Custom Plan Provider": "Citus Adaptive",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Distributed Query": {
|
||||||
|
"Job": {
|
||||||
|
"Task Count": 16,
|
||||||
|
"Tasks Shown": "One of 16",
|
||||||
|
"Tasks": [
|
||||||
|
{
|
||||||
|
"Node": "host=localhost port=xxxxx dbname=regression",
|
||||||
|
"Remote Plan": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Plan": {
|
||||||
|
"Node Type": "Aggregate",
|
||||||
|
"Strategy": "Hashed",
|
||||||
|
"Partial Mode": "Simple",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Group Key": ["l_quantity"],
|
||||||
|
"Plans": [
|
||||||
|
{
|
||||||
|
"Node Type": "Seq Scan",
|
||||||
|
"Parent Relationship": "Outer",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Relation Name": "lineitem_mx_1220052",
|
||||||
|
"Alias": "lineitem_mx"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
-- Validate JSON format
|
||||||
|
SELECT true AS valid FROM explain_json($$
|
||||||
|
SELECT l_quantity, count(*) count_quantity FROM lineitem_mx
|
||||||
|
GROUP BY l_quantity ORDER BY count_quantity, l_quantity$$);
|
||||||
|
t
|
||||||
|
\c - - - :worker_1_port
|
||||||
|
-- Test XML format
|
||||||
|
EXPLAIN (COSTS FALSE, FORMAT XML)
|
||||||
|
SELECT l_quantity, count(*) count_quantity FROM lineitem_mx
|
||||||
|
GROUP BY l_quantity ORDER BY count_quantity, l_quantity;
|
||||||
|
<explain xmlns="http://www.postgresql.org/2009/explain">
|
||||||
|
<Query>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Sort</Node-Type>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Sort-Key>
|
||||||
|
<Item>(COALESCE((pg_catalog.sum(remote_scan.count_quantity))::bigint, '0'::bigint))</Item>
|
||||||
|
<Item>remote_scan.l_quantity</Item>
|
||||||
|
</Sort-Key>
|
||||||
|
<Plans>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Aggregate</Node-Type>
|
||||||
|
<Strategy>Hashed</Strategy>
|
||||||
|
<Partial-Mode>Simple</Partial-Mode>
|
||||||
|
<Parent-Relationship>Outer</Parent-Relationship>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Group-Key>
|
||||||
|
<Item>remote_scan.l_quantity</Item>
|
||||||
|
</Group-Key>
|
||||||
|
<Plans>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Custom Scan</Node-Type>
|
||||||
|
<Parent-Relationship>Outer</Parent-Relationship>
|
||||||
|
<Custom-Plan-Provider>Citus Adaptive</Custom-Plan-Provider>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Distributed-Query>
|
||||||
|
<Job>
|
||||||
|
<Task-Count>16</Task-Count>
|
||||||
|
<Tasks-Shown>One of 16</Tasks-Shown>
|
||||||
|
<Tasks>
|
||||||
|
<Task>
|
||||||
|
<Node>host=localhost port=xxxxx dbname=regression</Node>
|
||||||
|
<Remote-Plan>
|
||||||
|
<explain xmlns="http://www.postgresql.org/2009/explain">
|
||||||
|
<Query>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Aggregate</Node-Type>
|
||||||
|
<Strategy>Hashed</Strategy>
|
||||||
|
<Partial-Mode>Simple</Partial-Mode>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Group-Key>
|
||||||
|
<Item>l_quantity</Item>
|
||||||
|
</Group-Key>
|
||||||
|
<Plans>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Seq Scan</Node-Type>
|
||||||
|
<Parent-Relationship>Outer</Parent-Relationship>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Relation-Name>lineitem_mx_1220052</Relation-Name>
|
||||||
|
<Alias>lineitem_mx</Alias>
|
||||||
|
</Plan>
|
||||||
|
</Plans>
|
||||||
|
</Plan>
|
||||||
|
</Query>
|
||||||
|
</explain>
|
||||||
|
</Remote-Plan>
|
||||||
|
</Task>
|
||||||
|
</Tasks>
|
||||||
|
</Job>
|
||||||
|
</Distributed-Query>
|
||||||
|
</Plan>
|
||||||
|
</Plans>
|
||||||
|
</Plan>
|
||||||
|
</Plans>
|
||||||
|
</Plan>
|
||||||
|
</Query>
|
||||||
|
</explain>
|
||||||
|
-- Validate XML format
|
||||||
|
SELECT true AS valid FROM explain_xml($$
|
||||||
|
SELECT l_quantity, count(*) count_quantity FROM lineitem_mx
|
||||||
|
GROUP BY l_quantity ORDER BY count_quantity, l_quantity$$);
|
||||||
|
t
|
||||||
|
-- Test YAML format
|
||||||
|
EXPLAIN (COSTS FALSE, FORMAT YAML)
|
||||||
|
SELECT l_quantity, count(*) count_quantity FROM lineitem_mx
|
||||||
|
GROUP BY l_quantity ORDER BY count_quantity, l_quantity;
|
||||||
|
- Plan:
|
||||||
|
Node Type: "Sort"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Sort Key:
|
||||||
|
- "(COALESCE((pg_catalog.sum(remote_scan.count_quantity))::bigint, '0'::bigint))"
|
||||||
|
- "remote_scan.l_quantity"
|
||||||
|
Plans:
|
||||||
|
- Node Type: "Aggregate"
|
||||||
|
Strategy: "Hashed"
|
||||||
|
Partial Mode: "Simple"
|
||||||
|
Parent Relationship: "Outer"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Group Key:
|
||||||
|
- "remote_scan.l_quantity"
|
||||||
|
Plans:
|
||||||
|
- Node Type: "Custom Scan"
|
||||||
|
Parent Relationship: "Outer"
|
||||||
|
Custom Plan Provider: "Citus Adaptive"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Distributed Query:
|
||||||
|
Job:
|
||||||
|
Task Count: 16
|
||||||
|
Tasks Shown: "One of 16"
|
||||||
|
Tasks:
|
||||||
|
- Node: "host=localhost port=xxxxx dbname=regression"
|
||||||
|
Remote Plan:
|
||||||
|
- Plan:
|
||||||
|
Node Type: "Aggregate"
|
||||||
|
Strategy: "Hashed"
|
||||||
|
Partial Mode: "Simple"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Group Key:
|
||||||
|
- "l_quantity"
|
||||||
|
Plans:
|
||||||
|
- Node Type: "Seq Scan"
|
||||||
|
Parent Relationship: "Outer"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Relation Name: "lineitem_mx_1220052"
|
||||||
|
Alias: "lineitem_mx"
|
||||||
|
|
||||||
|
-- Test Text format
|
||||||
|
EXPLAIN (COSTS FALSE, FORMAT TEXT)
|
||||||
|
SELECT l_quantity, count(*) count_quantity FROM lineitem_mx
|
||||||
|
GROUP BY l_quantity ORDER BY count_quantity, l_quantity;
|
||||||
|
Sort
|
||||||
|
Sort Key: (COALESCE((pg_catalog.sum(remote_scan.count_quantity))::bigint, '0'::bigint)), remote_scan.l_quantity
|
||||||
|
-> HashAggregate
|
||||||
|
Group Key: remote_scan.l_quantity
|
||||||
|
-> Custom Scan (Citus Adaptive)
|
||||||
|
Task Count: 16
|
||||||
|
Tasks Shown: One of 16
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> HashAggregate
|
||||||
|
Group Key: l_quantity
|
||||||
|
-> Seq Scan on lineitem_mx_1220052 lineitem_mx
|
||||||
|
\c - - - :worker_2_port
|
||||||
|
-- Test verbose
|
||||||
|
EXPLAIN (COSTS FALSE, VERBOSE TRUE)
|
||||||
|
SELECT sum(l_quantity) / avg(l_quantity) FROM lineitem_mx;
|
||||||
|
Aggregate
|
||||||
|
Output: (sum(remote_scan."?column?") / (sum(remote_scan."?column?_1") / pg_catalog.sum(remote_scan."?column?_2")))
|
||||||
|
-> Custom Scan (Citus Adaptive)
|
||||||
|
Output: remote_scan."?column?", remote_scan."?column?_1", remote_scan."?column?_2"
|
||||||
|
Task Count: 16
|
||||||
|
Tasks Shown: One of 16
|
||||||
|
-> Task
|
||||||
|
Query: SELECT sum(l_quantity), sum(l_quantity), count(l_quantity) FROM public.lineitem_mx_1220052 lineitem_mx WHERE true
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
Output: sum(l_quantity), sum(l_quantity), count(l_quantity)
|
||||||
|
-> Seq Scan on public.lineitem_mx_1220052 lineitem_mx
|
||||||
|
Output: l_orderkey, l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_comment
|
||||||
|
-- Test join
|
||||||
|
EXPLAIN (COSTS FALSE)
|
||||||
|
SELECT * FROM lineitem_mx
|
||||||
|
JOIN orders_mx ON l_orderkey = o_orderkey AND l_quantity < 5.0
|
||||||
|
ORDER BY l_quantity LIMIT 10;
|
||||||
|
Limit
|
||||||
|
-> Sort
|
||||||
|
Sort Key: remote_scan.l_quantity
|
||||||
|
-> Custom Scan (Citus Adaptive)
|
||||||
|
Task Count: 16
|
||||||
|
Tasks Shown: One of 16
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Limit
|
||||||
|
-> Sort
|
||||||
|
Sort Key: lineitem_mx.l_quantity
|
||||||
|
-> Hash Join
|
||||||
|
Hash Cond: (lineitem_mx.l_orderkey = orders_mx.o_orderkey)
|
||||||
|
-> Seq Scan on lineitem_mx_1220052 lineitem_mx
|
||||||
|
Filter: (l_quantity < 5.0)
|
||||||
|
-> Hash
|
||||||
|
-> Seq Scan on orders_mx_1220068 orders_mx
|
||||||
|
-- Test insert
|
||||||
|
EXPLAIN (COSTS FALSE)
|
||||||
|
INSERT INTO lineitem_mx VALUES(1,0);
|
||||||
|
Custom Scan (Citus Adaptive)
|
||||||
|
Task Count: 1
|
||||||
|
Tasks Shown: All
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Insert on lineitem_mx_1220052
|
||||||
|
-> Result
|
||||||
|
-- Test update
|
||||||
|
EXPLAIN (COSTS FALSE)
|
||||||
|
UPDATE lineitem_mx
|
||||||
|
SET l_suppkey = 12
|
||||||
|
WHERE l_orderkey = 1 AND l_partkey = 0;
|
||||||
|
Custom Scan (Citus Adaptive)
|
||||||
|
Task Count: 1
|
||||||
|
Tasks Shown: All
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Update on lineitem_mx_1220052 lineitem_mx
|
||||||
|
-> Index Scan using lineitem_mx_pkey_1220052 on lineitem_mx_1220052 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey = 1)
|
||||||
|
Filter: (l_partkey = 0)
|
||||||
|
-- Test delete
|
||||||
|
EXPLAIN (COSTS FALSE)
|
||||||
|
DELETE FROM lineitem_mx
|
||||||
|
WHERE l_orderkey = 1 AND l_partkey = 0;
|
||||||
|
Custom Scan (Citus Adaptive)
|
||||||
|
Task Count: 1
|
||||||
|
Tasks Shown: All
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Delete on lineitem_mx_1220052 lineitem_mx
|
||||||
|
-> Index Scan using lineitem_mx_pkey_1220052 on lineitem_mx_1220052 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey = 1)
|
||||||
|
Filter: (l_partkey = 0)
|
||||||
|
-- make the outputs more consistent
|
||||||
|
VACUUM ANALYZE lineitem_mx;
|
||||||
|
VACUUM ANALYZE orders_mx;
|
||||||
|
VACUUM ANALYZE customer_mx;
|
||||||
|
VACUUM ANALYZE supplier_mx;
|
||||||
|
-- Test single-shard SELECT
|
||||||
|
EXPLAIN (COSTS FALSE)
|
||||||
|
SELECT l_quantity FROM lineitem_mx WHERE l_orderkey = 5;
|
||||||
|
Custom Scan (Citus Adaptive)
|
||||||
|
Task Count: 1
|
||||||
|
Tasks Shown: All
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Index Scan using lineitem_mx_pkey_1220055 on lineitem_mx_1220055 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey = 5)
|
||||||
|
SELECT true AS valid FROM explain_xml($$
|
||||||
|
SELECT l_quantity FROM lineitem_mx WHERE l_orderkey = 5$$);
|
||||||
|
t
|
||||||
|
SELECT true AS valid FROM explain_json($$
|
||||||
|
SELECT l_quantity FROM lineitem_mx WHERE l_orderkey = 5$$);
|
||||||
|
t
|
||||||
|
-- Test CREATE TABLE ... AS
|
||||||
|
EXPLAIN (COSTS FALSE)
|
||||||
|
CREATE TABLE explain_result AS
|
||||||
|
SELECT * FROM lineitem_mx;
|
||||||
|
Custom Scan (Citus Adaptive)
|
||||||
|
Task Count: 16
|
||||||
|
Tasks Shown: One of 16
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Seq Scan on lineitem_mx_1220052 lineitem_mx
|
||||||
|
-- Test all tasks output
|
||||||
|
SET citus.explain_all_tasks TO on;
|
||||||
|
EXPLAIN (COSTS FALSE)
|
||||||
|
SELECT avg(l_linenumber) FROM lineitem_mx WHERE l_orderkey > 9030;
|
||||||
|
Aggregate
|
||||||
|
-> Custom Scan (Citus Adaptive)
|
||||||
|
Task Count: 16
|
||||||
|
Tasks Shown: All
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Index Only Scan using lineitem_mx_pkey_1220052 on lineitem_mx_1220052 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey > 9030)
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Index Only Scan using lineitem_mx_pkey_1220053 on lineitem_mx_1220053 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey > 9030)
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Index Only Scan using lineitem_mx_pkey_1220054 on lineitem_mx_1220054 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey > 9030)
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Index Only Scan using lineitem_mx_pkey_1220055 on lineitem_mx_1220055 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey > 9030)
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Index Only Scan using lineitem_mx_pkey_1220056 on lineitem_mx_1220056 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey > 9030)
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Index Only Scan using lineitem_mx_pkey_1220057 on lineitem_mx_1220057 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey > 9030)
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Index Only Scan using lineitem_mx_pkey_1220058 on lineitem_mx_1220058 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey > 9030)
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Index Only Scan using lineitem_mx_pkey_1220059 on lineitem_mx_1220059 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey > 9030)
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Index Only Scan using lineitem_mx_pkey_1220060 on lineitem_mx_1220060 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey > 9030)
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Index Only Scan using lineitem_mx_pkey_1220061 on lineitem_mx_1220061 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey > 9030)
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Index Only Scan using lineitem_mx_pkey_1220062 on lineitem_mx_1220062 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey > 9030)
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Index Only Scan using lineitem_mx_pkey_1220063 on lineitem_mx_1220063 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey > 9030)
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Index Only Scan using lineitem_mx_pkey_1220064 on lineitem_mx_1220064 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey > 9030)
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Seq Scan on lineitem_mx_1220065 lineitem_mx
|
||||||
|
Filter: (l_orderkey > 9030)
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Index Only Scan using lineitem_mx_pkey_1220066 on lineitem_mx_1220066 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey > 9030)
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Index Only Scan using lineitem_mx_pkey_1220067 on lineitem_mx_1220067 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey > 9030)
|
||||||
|
SELECT true AS valid FROM explain_xml($$
|
||||||
|
SELECT avg(l_linenumber) FROM lineitem_mx WHERE l_orderkey > 9030$$);
|
||||||
|
t
|
||||||
|
SELECT true AS valid FROM explain_json($$
|
||||||
|
SELECT avg(l_linenumber) FROM lineitem_mx WHERE l_orderkey > 9030$$);
|
||||||
|
t
|
||||||
|
-- Test track tracker
|
||||||
|
SET citus.explain_all_tasks TO off;
|
||||||
|
EXPLAIN (COSTS FALSE)
|
||||||
|
SELECT avg(l_linenumber) FROM lineitem_mx WHERE l_orderkey > 9030;
|
||||||
|
Aggregate
|
||||||
|
-> Custom Scan (Citus Adaptive)
|
||||||
|
Task Count: 16
|
||||||
|
Tasks Shown: One of 16
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Index Only Scan using lineitem_mx_pkey_1220052 on lineitem_mx_1220052 lineitem_mx
|
||||||
|
Index Cond: (l_orderkey > 9030)
|
||||||
|
-- Test re-partition join
|
||||||
|
EXPLAIN (COSTS FALSE)
|
||||||
|
SELECT count(*)
|
||||||
|
FROM lineitem_mx, orders_mx, customer_mx, supplier_mx
|
||||||
|
WHERE l_orderkey = o_orderkey
|
||||||
|
AND o_custkey = c_custkey
|
||||||
|
AND l_suppkey = s_suppkey;
|
||||||
|
Aggregate
|
||||||
|
-> Custom Scan (Citus Adaptive)
|
||||||
|
Task Count: 16
|
||||||
|
Tasks Shown: One of 16
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Aggregate
|
||||||
|
-> Hash Join
|
||||||
|
Hash Cond: (lineitem_mx.l_orderkey = orders_mx.o_orderkey)
|
||||||
|
-> Hash Join
|
||||||
|
Hash Cond: (supplier_mx.s_suppkey = lineitem_mx.l_suppkey)
|
||||||
|
-> Seq Scan on supplier_mx_1220087 supplier_mx
|
||||||
|
-> Hash
|
||||||
|
-> Seq Scan on lineitem_mx_1220052 lineitem_mx
|
||||||
|
-> Hash
|
||||||
|
-> Hash Join
|
||||||
|
Hash Cond: (customer_mx.c_custkey = orders_mx.o_custkey)
|
||||||
|
-> Seq Scan on customer_mx_1220084 customer_mx
|
||||||
|
-> Hash
|
||||||
|
-> Seq Scan on orders_mx_1220068 orders_mx
|
||||||
|
EXPLAIN (COSTS FALSE, FORMAT JSON)
|
||||||
|
SELECT count(*)
|
||||||
|
FROM lineitem_mx, orders_mx, customer_mx, supplier_mx
|
||||||
|
WHERE l_orderkey = o_orderkey
|
||||||
|
AND o_custkey = c_custkey
|
||||||
|
AND l_suppkey = s_suppkey;
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Plan": {
|
||||||
|
"Node Type": "Aggregate",
|
||||||
|
"Strategy": "Plain",
|
||||||
|
"Partial Mode": "Simple",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Plans": [
|
||||||
|
{
|
||||||
|
"Node Type": "Custom Scan",
|
||||||
|
"Parent Relationship": "Outer",
|
||||||
|
"Custom Plan Provider": "Citus Adaptive",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Distributed Query": {
|
||||||
|
"Job": {
|
||||||
|
"Task Count": 16,
|
||||||
|
"Tasks Shown": "One of 16",
|
||||||
|
"Tasks": [
|
||||||
|
{
|
||||||
|
"Node": "host=localhost port=xxxxx dbname=regression",
|
||||||
|
"Remote Plan": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Plan": {
|
||||||
|
"Node Type": "Aggregate",
|
||||||
|
"Strategy": "Plain",
|
||||||
|
"Partial Mode": "Simple",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Plans": [
|
||||||
|
{
|
||||||
|
"Node Type": "Hash Join",
|
||||||
|
"Parent Relationship": "Outer",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Join Type": "Inner",
|
||||||
|
"Inner Unique": false,
|
||||||
|
"Hash Cond": "(lineitem_mx.l_orderkey = orders_mx.o_orderkey)",
|
||||||
|
"Plans": [
|
||||||
|
{
|
||||||
|
"Node Type": "Hash Join",
|
||||||
|
"Parent Relationship": "Outer",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Join Type": "Inner",
|
||||||
|
"Inner Unique": false,
|
||||||
|
"Hash Cond": "(supplier_mx.s_suppkey = lineitem_mx.l_suppkey)",
|
||||||
|
"Plans": [
|
||||||
|
{
|
||||||
|
"Node Type": "Seq Scan",
|
||||||
|
"Parent Relationship": "Outer",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Relation Name": "supplier_mx_1220087",
|
||||||
|
"Alias": "supplier_mx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Node Type": "Hash",
|
||||||
|
"Parent Relationship": "Inner",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Plans": [
|
||||||
|
{
|
||||||
|
"Node Type": "Seq Scan",
|
||||||
|
"Parent Relationship": "Outer",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Relation Name": "lineitem_mx_1220052",
|
||||||
|
"Alias": "lineitem_mx"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Node Type": "Hash",
|
||||||
|
"Parent Relationship": "Inner",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Plans": [
|
||||||
|
{
|
||||||
|
"Node Type": "Hash Join",
|
||||||
|
"Parent Relationship": "Outer",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Join Type": "Inner",
|
||||||
|
"Inner Unique": false,
|
||||||
|
"Hash Cond": "(customer_mx.c_custkey = orders_mx.o_custkey)",
|
||||||
|
"Plans": [
|
||||||
|
{
|
||||||
|
"Node Type": "Seq Scan",
|
||||||
|
"Parent Relationship": "Outer",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Relation Name": "customer_mx_1220084",
|
||||||
|
"Alias": "customer_mx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Node Type": "Hash",
|
||||||
|
"Parent Relationship": "Inner",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Plans": [
|
||||||
|
{
|
||||||
|
"Node Type": "Seq Scan",
|
||||||
|
"Parent Relationship": "Outer",
|
||||||
|
"Parallel Aware": false,
|
||||||
|
"Async Capable": false,
|
||||||
|
"Relation Name": "orders_mx_1220068",
|
||||||
|
"Alias": "orders_mx"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
SELECT true AS valid FROM explain_json($$
|
||||||
|
SELECT count(*)
|
||||||
|
FROM lineitem_mx, orders_mx, customer_mx, supplier_mx
|
||||||
|
WHERE l_orderkey = o_orderkey
|
||||||
|
AND o_custkey = c_custkey
|
||||||
|
AND l_suppkey = s_suppkey$$);
|
||||||
|
t
|
||||||
|
EXPLAIN (COSTS FALSE, FORMAT XML)
|
||||||
|
SELECT count(*)
|
||||||
|
FROM lineitem_mx, orders_mx, customer_mx, supplier_mx
|
||||||
|
WHERE l_orderkey = o_orderkey
|
||||||
|
AND o_custkey = c_custkey
|
||||||
|
AND l_suppkey = s_suppkey;
|
||||||
|
<explain xmlns="http://www.postgresql.org/2009/explain">
|
||||||
|
<Query>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Aggregate</Node-Type>
|
||||||
|
<Strategy>Plain</Strategy>
|
||||||
|
<Partial-Mode>Simple</Partial-Mode>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Plans>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Custom Scan</Node-Type>
|
||||||
|
<Parent-Relationship>Outer</Parent-Relationship>
|
||||||
|
<Custom-Plan-Provider>Citus Adaptive</Custom-Plan-Provider>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Distributed-Query>
|
||||||
|
<Job>
|
||||||
|
<Task-Count>16</Task-Count>
|
||||||
|
<Tasks-Shown>One of 16</Tasks-Shown>
|
||||||
|
<Tasks>
|
||||||
|
<Task>
|
||||||
|
<Node>host=localhost port=xxxxx dbname=regression</Node>
|
||||||
|
<Remote-Plan>
|
||||||
|
<explain xmlns="http://www.postgresql.org/2009/explain">
|
||||||
|
<Query>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Aggregate</Node-Type>
|
||||||
|
<Strategy>Plain</Strategy>
|
||||||
|
<Partial-Mode>Simple</Partial-Mode>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Plans>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Hash Join</Node-Type>
|
||||||
|
<Parent-Relationship>Outer</Parent-Relationship>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Join-Type>Inner</Join-Type>
|
||||||
|
<Inner-Unique>false</Inner-Unique>
|
||||||
|
<Hash-Cond>(lineitem_mx.l_orderkey = orders_mx.o_orderkey)</Hash-Cond>
|
||||||
|
<Plans>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Hash Join</Node-Type>
|
||||||
|
<Parent-Relationship>Outer</Parent-Relationship>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Join-Type>Inner</Join-Type>
|
||||||
|
<Inner-Unique>false</Inner-Unique>
|
||||||
|
<Hash-Cond>(supplier_mx.s_suppkey = lineitem_mx.l_suppkey)</Hash-Cond>
|
||||||
|
<Plans>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Seq Scan</Node-Type>
|
||||||
|
<Parent-Relationship>Outer</Parent-Relationship>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Relation-Name>supplier_mx_1220087</Relation-Name>
|
||||||
|
<Alias>supplier_mx</Alias>
|
||||||
|
</Plan>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Hash</Node-Type>
|
||||||
|
<Parent-Relationship>Inner</Parent-Relationship>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Plans>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Seq Scan</Node-Type>
|
||||||
|
<Parent-Relationship>Outer</Parent-Relationship>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Relation-Name>lineitem_mx_1220052</Relation-Name>
|
||||||
|
<Alias>lineitem_mx</Alias>
|
||||||
|
</Plan>
|
||||||
|
</Plans>
|
||||||
|
</Plan>
|
||||||
|
</Plans>
|
||||||
|
</Plan>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Hash</Node-Type>
|
||||||
|
<Parent-Relationship>Inner</Parent-Relationship>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Plans>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Hash Join</Node-Type>
|
||||||
|
<Parent-Relationship>Outer</Parent-Relationship>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Join-Type>Inner</Join-Type>
|
||||||
|
<Inner-Unique>false</Inner-Unique>
|
||||||
|
<Hash-Cond>(customer_mx.c_custkey = orders_mx.o_custkey)</Hash-Cond>
|
||||||
|
<Plans>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Seq Scan</Node-Type>
|
||||||
|
<Parent-Relationship>Outer</Parent-Relationship>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Relation-Name>customer_mx_1220084</Relation-Name>
|
||||||
|
<Alias>customer_mx</Alias>
|
||||||
|
</Plan>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Hash</Node-Type>
|
||||||
|
<Parent-Relationship>Inner</Parent-Relationship>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Plans>
|
||||||
|
<Plan>
|
||||||
|
<Node-Type>Seq Scan</Node-Type>
|
||||||
|
<Parent-Relationship>Outer</Parent-Relationship>
|
||||||
|
<Parallel-Aware>false</Parallel-Aware>
|
||||||
|
<Async-Capable>false</Async-Capable>
|
||||||
|
<Relation-Name>orders_mx_1220068</Relation-Name>
|
||||||
|
<Alias>orders_mx</Alias>
|
||||||
|
</Plan>
|
||||||
|
</Plans>
|
||||||
|
</Plan>
|
||||||
|
</Plans>
|
||||||
|
</Plan>
|
||||||
|
</Plans>
|
||||||
|
</Plan>
|
||||||
|
</Plans>
|
||||||
|
</Plan>
|
||||||
|
</Plans>
|
||||||
|
</Plan>
|
||||||
|
</Query>
|
||||||
|
</explain>
|
||||||
|
</Remote-Plan>
|
||||||
|
</Task>
|
||||||
|
</Tasks>
|
||||||
|
</Job>
|
||||||
|
</Distributed-Query>
|
||||||
|
</Plan>
|
||||||
|
</Plans>
|
||||||
|
</Plan>
|
||||||
|
</Query>
|
||||||
|
</explain>
|
||||||
|
SELECT true AS valid FROM explain_xml($$
|
||||||
|
SELECT count(*)
|
||||||
|
FROM lineitem_mx, orders_mx, customer_mx, supplier_mx
|
||||||
|
WHERE l_orderkey = o_orderkey
|
||||||
|
AND o_custkey = c_custkey
|
||||||
|
AND l_suppkey = s_suppkey$$);
|
||||||
|
t
|
||||||
|
EXPLAIN (COSTS FALSE, FORMAT YAML)
|
||||||
|
SELECT count(*)
|
||||||
|
FROM lineitem_mx, orders_mx, customer_mx, supplier_mx
|
||||||
|
WHERE l_orderkey = o_orderkey
|
||||||
|
AND o_custkey = c_custkey
|
||||||
|
AND l_suppkey = s_suppkey;
|
||||||
|
- Plan:
|
||||||
|
Node Type: "Aggregate"
|
||||||
|
Strategy: "Plain"
|
||||||
|
Partial Mode: "Simple"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Plans:
|
||||||
|
- Node Type: "Custom Scan"
|
||||||
|
Parent Relationship: "Outer"
|
||||||
|
Custom Plan Provider: "Citus Adaptive"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Distributed Query:
|
||||||
|
Job:
|
||||||
|
Task Count: 16
|
||||||
|
Tasks Shown: "One of 16"
|
||||||
|
Tasks:
|
||||||
|
- Node: "host=localhost port=xxxxx dbname=regression"
|
||||||
|
Remote Plan:
|
||||||
|
- Plan:
|
||||||
|
Node Type: "Aggregate"
|
||||||
|
Strategy: "Plain"
|
||||||
|
Partial Mode: "Simple"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Plans:
|
||||||
|
- Node Type: "Hash Join"
|
||||||
|
Parent Relationship: "Outer"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Join Type: "Inner"
|
||||||
|
Inner Unique: false
|
||||||
|
Hash Cond: "(lineitem_mx.l_orderkey = orders_mx.o_orderkey)"
|
||||||
|
Plans:
|
||||||
|
- Node Type: "Hash Join"
|
||||||
|
Parent Relationship: "Outer"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Join Type: "Inner"
|
||||||
|
Inner Unique: false
|
||||||
|
Hash Cond: "(supplier_mx.s_suppkey = lineitem_mx.l_suppkey)"
|
||||||
|
Plans:
|
||||||
|
- Node Type: "Seq Scan"
|
||||||
|
Parent Relationship: "Outer"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Relation Name: "supplier_mx_1220087"
|
||||||
|
Alias: "supplier_mx"
|
||||||
|
- Node Type: "Hash"
|
||||||
|
Parent Relationship: "Inner"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Plans:
|
||||||
|
- Node Type: "Seq Scan"
|
||||||
|
Parent Relationship: "Outer"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Relation Name: "lineitem_mx_1220052"
|
||||||
|
Alias: "lineitem_mx"
|
||||||
|
- Node Type: "Hash"
|
||||||
|
Parent Relationship: "Inner"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Plans:
|
||||||
|
- Node Type: "Hash Join"
|
||||||
|
Parent Relationship: "Outer"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Join Type: "Inner"
|
||||||
|
Inner Unique: false
|
||||||
|
Hash Cond: "(customer_mx.c_custkey = orders_mx.o_custkey)"
|
||||||
|
Plans:
|
||||||
|
- Node Type: "Seq Scan"
|
||||||
|
Parent Relationship: "Outer"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Relation Name: "customer_mx_1220084"
|
||||||
|
Alias: "customer_mx"
|
||||||
|
- Node Type: "Hash"
|
||||||
|
Parent Relationship: "Inner"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Plans:
|
||||||
|
- Node Type: "Seq Scan"
|
||||||
|
Parent Relationship: "Outer"
|
||||||
|
Parallel Aware: false
|
||||||
|
Async Capable: false
|
||||||
|
Relation Name: "orders_mx_1220068"
|
||||||
|
Alias: "orders_mx"
|
||||||
|
|
||||||
|
|
@ -2149,81 +2149,61 @@ CONTEXT: PL/pgSQL function public.explain_filter(text,boolean) line XX at FOR o
|
||||||
Planning Time: N.N
|
Planning Time: N.N
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
select public.explain_filter('explain (memory, analyze, buffers false, format json) select * from int8_tbl i8');
|
select public.explain_filter('explain (memory, analyze, buffers false, format yaml) select * from int8_tbl i8');
|
||||||
NOTICE: issuing SELECT * FROM worker_save_query_explain_analyze('SELECT q1, q2 FROM pg17.int8_tbl_12242024 i8 WHERE true', '{"verbose": false, "costs": true, "buffers": false, "wal": false, "memory": true, "serialize": "none", "timing": true, "summary": true, "format": "JSON"}') AS (field_0 bigint, field_1 bigint)
|
NOTICE: issuing SELECT * FROM worker_save_query_explain_analyze('SELECT q1, q2 FROM pg17.int8_tbl_12242024 i8 WHERE true', '{"verbose": false, "costs": true, "buffers": false, "wal": false, "memory": true, "serialize": "none", "timing": true, "summary": true, "format": "YAML"}') AS (field_0 bigint, field_1 bigint)
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||||
CONTEXT: PL/pgSQL function public.explain_filter(text,boolean) line XX at FOR over EXECUTE statement
|
CONTEXT: PL/pgSQL function public.explain_filter(text,boolean) line XX at FOR over EXECUTE statement
|
||||||
explain_filter
|
explain_filter
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
[ +
|
- Plan: +
|
||||||
{ +
|
Node Type: "Custom Scan" +
|
||||||
"Plan": { +
|
Custom Plan Provider: "Citus Adaptive" +
|
||||||
"Node Type": "Custom Scan", +
|
Parallel Aware: false +
|
||||||
"Custom Plan Provider": "Citus Adaptive", +
|
Async Capable: false +
|
||||||
"Parallel Aware": false, +
|
Startup Cost: N.N +
|
||||||
"Async Capable": false, +
|
Total Cost: N.N +
|
||||||
"Startup Cost": N.N, +
|
Plan Rows: N +
|
||||||
"Total Cost": N.N, +
|
Plan Width: N +
|
||||||
"Plan Rows": N, +
|
Actual Startup Time: N.N +
|
||||||
"Plan Width": N, +
|
Actual Total Time: N.N +
|
||||||
"Actual Startup Time": N.N, +
|
Actual Rows: N +
|
||||||
"Actual Total Time": N.N, +
|
Actual Loops: N +
|
||||||
"Actual Rows": N, +
|
Distributed Query: +
|
||||||
"Actual Loops": N, +
|
Job: +
|
||||||
"Distributed Query": { +
|
Task Count: N +
|
||||||
"Job": { +
|
Tuple data received from nodes: "N bytes" +
|
||||||
"Task Count": N, +
|
Tasks Shown: "One of N" +
|
||||||
"Tuple data received from nodes": "N bytes", +
|
Tasks: +
|
||||||
"Tasks Shown": "One of N", +
|
- Tuple data received from node: "N bytes" +
|
||||||
"Tasks": [ +
|
Node: "host=localhost port=N dbname=regression"+
|
||||||
{ +
|
Remote Plan: +
|
||||||
"Tuple data received from node": "N bytes", +
|
- Plan: +
|
||||||
"Node": "host=localhost port=N dbname=regression",+
|
Node Type: "Seq Scan" +
|
||||||
"Remote Plan": [ +
|
Parallel Aware: false +
|
||||||
[ +
|
Async Capable: false +
|
||||||
{ +
|
Relation Name: "int8_tbl_12242024" +
|
||||||
"Plan": { +
|
Alias: "i8" +
|
||||||
"Node Type": "Seq Scan", +
|
Startup Cost: N.N +
|
||||||
"Parallel Aware": false, +
|
Total Cost: N.N +
|
||||||
"Async Capable": false, +
|
Plan Rows: N +
|
||||||
"Relation Name": "int8_tbl_12242024", +
|
Plan Width: N +
|
||||||
"Alias": "i8", +
|
Actual Startup Time: N.N +
|
||||||
"Startup Cost": N.N, +
|
Actual Total Time: N.N +
|
||||||
"Total Cost": N.N, +
|
Actual Rows: N +
|
||||||
"Plan Rows": N, +
|
Actual Loops: N +
|
||||||
"Plan Width": N, +
|
Planning: +
|
||||||
"Actual Startup Time": N.N, +
|
Memory Used: N +
|
||||||
"Actual Total Time": N.N, +
|
Memory Allocated: N +
|
||||||
"Actual Rows": N, +
|
Planning Time: N.N +
|
||||||
"Actual Loops": N +
|
Triggers: +
|
||||||
}, +
|
Execution Time: N.N +
|
||||||
"Planning": { +
|
+
|
||||||
"Memory Used": N, +
|
Planning: +
|
||||||
"Memory Allocated": N +
|
Memory Used: N +
|
||||||
}, +
|
Memory Allocated: N +
|
||||||
"Planning Time": N.N, +
|
Planning Time: N.N +
|
||||||
"Triggers": [ +
|
Triggers: +
|
||||||
], +
|
Execution Time: N.N
|
||||||
"Execution Time": N.N +
|
|
||||||
} +
|
|
||||||
] +
|
|
||||||
+
|
|
||||||
] +
|
|
||||||
} +
|
|
||||||
] +
|
|
||||||
} +
|
|
||||||
} +
|
|
||||||
}, +
|
|
||||||
"Planning": { +
|
|
||||||
"Memory Used": N, +
|
|
||||||
"Memory Allocated": N +
|
|
||||||
}, +
|
|
||||||
"Planning Time": N.N, +
|
|
||||||
"Triggers": [ +
|
|
||||||
], +
|
|
||||||
"Execution Time": N.N +
|
|
||||||
} +
|
|
||||||
]
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
prepare int8_query as select * from int8_tbl i8;
|
prepare int8_query as select * from int8_tbl i8;
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,13 @@
|
||||||
-- https://github.com/postgres/postgres/commit/f4c7c410ee4a7baa06f51ebb8d5333c169691dd3
|
-- https://github.com/postgres/postgres/commit/f4c7c410ee4a7baa06f51ebb8d5333c169691dd3
|
||||||
-- The alternative output can be deleted when we drop support for PG15
|
-- The alternative output can be deleted when we drop support for PG15
|
||||||
--
|
--
|
||||||
|
-- This test file has an alternative output because of the following in PG18:
|
||||||
|
-- https://github.com/postgres/postgres/commit/161320b4b960ee4fe918959be6529ae9b106ea5a
|
||||||
|
-- The alternative output can be deleted when we drop support for PG17
|
||||||
|
--
|
||||||
SHOW server_version \gset
|
SHOW server_version \gset
|
||||||
SELECT substring(:'server_version', '\d+')::int >= 16 AS server_version_ge_16;
|
SELECT substring(:'server_version', '\d+')::int >= 16 AS server_version_ge_16;
|
||||||
|
SELECT substring(:'server_version', '\d+')::int >= 18 AS server_version_ge_18;
|
||||||
|
|
||||||
SET citus.next_shard_id TO 570000;
|
SET citus.next_shard_id TO 570000;
|
||||||
|
|
||||||
|
|
@ -930,10 +935,10 @@ ROLLBACK;
|
||||||
|
|
||||||
-- test EXPLAIN ANALYZE with non-text output formats
|
-- test EXPLAIN ANALYZE with non-text output formats
|
||||||
BEGIN;
|
BEGIN;
|
||||||
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT JSON, BUFFERS OFF) INSERT INTO explain_pk VALUES (1, 2), (2, 3);
|
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT YAML, BUFFERS OFF) INSERT INTO explain_pk VALUES (1, 2), (2, 3);
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
|
|
||||||
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT JSON, BUFFERS OFF) SELECT * FROM explain_pk;
|
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT YAML, BUFFERS OFF) SELECT * FROM explain_pk;
|
||||||
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT XML, BUFFERS OFF) INSERT INTO explain_pk VALUES (1, 2), (2, 3);
|
EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off, FORMAT XML, BUFFERS OFF) INSERT INTO explain_pk VALUES (1, 2), (2, 3);
|
||||||
|
|
|
||||||
|
|
@ -1292,7 +1292,7 @@ SET citus.grep_remote_commands TO '%12242024%';
|
||||||
select public.explain_filter('explain (memory) select * from int8_tbl i8');
|
select public.explain_filter('explain (memory) select * from int8_tbl i8');
|
||||||
select public.explain_filter('explain (memory, analyze, buffers false) select * from int8_tbl i8');
|
select public.explain_filter('explain (memory, analyze, buffers false) select * from int8_tbl i8');
|
||||||
select public.explain_filter('explain (memory, summary, format yaml) select * from int8_tbl i8');
|
select public.explain_filter('explain (memory, summary, format yaml) select * from int8_tbl i8');
|
||||||
select public.explain_filter('explain (memory, analyze, buffers false, format json) select * from int8_tbl i8');
|
select public.explain_filter('explain (memory, analyze, buffers false, format yaml) select * from int8_tbl i8');
|
||||||
prepare int8_query as select * from int8_tbl i8;
|
prepare int8_query as select * from int8_tbl i8;
|
||||||
select public.explain_filter('explain (memory) execute int8_query');
|
select public.explain_filter('explain (memory) execute int8_query');
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue