mirror of https://github.com/citusdata/citus.git
Change single shard mx test tables to reference tables
parent
4d70c86645
commit
4d4648aabd
|
@ -295,10 +295,9 @@ CREATE TABLE customer_mx (
|
|||
c_acctbal decimal(15,2) not null,
|
||||
c_mktsegment char(10) not null,
|
||||
c_comment varchar(117) not null);
|
||||
SET citus.shard_count TO 1;
|
||||
SELECT create_distributed_table('customer_mx', 'c_custkey');
|
||||
create_distributed_table
|
||||
--------------------------
|
||||
SELECT create_reference_table('customer_mx');
|
||||
create_reference_table
|
||||
------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
|
@ -307,9 +306,9 @@ CREATE TABLE nation_mx (
|
|||
n_name char(25) not null,
|
||||
n_regionkey integer not null,
|
||||
n_comment varchar(152));
|
||||
SELECT create_distributed_table('nation_mx', 'n_nationkey');
|
||||
create_distributed_table
|
||||
--------------------------
|
||||
SELECT create_reference_table('nation_mx');
|
||||
create_reference_table
|
||||
------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
|
@ -323,9 +322,9 @@ CREATE TABLE part_mx (
|
|||
p_container char(10) not null,
|
||||
p_retailprice decimal(15,2) not null,
|
||||
p_comment varchar(23) not null);
|
||||
SELECT create_distributed_table('part_mx', 'p_partkey');
|
||||
create_distributed_table
|
||||
--------------------------
|
||||
SELECT create_reference_table('part_mx');
|
||||
create_reference_table
|
||||
------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
|
@ -339,9 +338,9 @@ CREATE TABLE supplier_mx
|
|||
s_acctbal decimal(15,2) not null,
|
||||
s_comment varchar(101) not null
|
||||
);
|
||||
SELECT create_distributed_table('supplier_mx', 's_suppkey');
|
||||
create_distributed_table
|
||||
--------------------------
|
||||
SELECT create_reference_table('supplier_mx');
|
||||
create_reference_table
|
||||
------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
|
@ -478,10 +477,10 @@ ORDER BY colocationid, logicalrelid;
|
|||
company_employees_mx | 3 | 4 | h | s
|
||||
lineitem_mx | 4 | 16 | h | s
|
||||
orders_mx | 4 | 16 | h | s
|
||||
customer_mx | 5 | 1 | h | s
|
||||
nation_mx | 5 | 1 | h | s
|
||||
part_mx | 5 | 1 | h | s
|
||||
supplier_mx | 5 | 1 | h | s
|
||||
customer_mx | 5 | 1 | n | t
|
||||
nation_mx | 5 | 1 | n | t
|
||||
part_mx | 5 | 1 | n | t
|
||||
supplier_mx | 5 | 1 | n | t
|
||||
limit_orders_mx | 6 | 2 | h | s
|
||||
articles_hash_mx | 6 | 2 | h | s
|
||||
multiple_hash_mx | 7 | 2 | h | s
|
||||
|
|
|
@ -354,6 +354,9 @@ Custom Scan (Citus Router)
|
|||
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;
|
||||
|
@ -498,20 +501,24 @@ EXPLAIN (COSTS FALSE)
|
|||
AND l_suppkey = s_suppkey;
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Task-Tracker)
|
||||
Task Count: 4
|
||||
Tasks Shown: None, not supported for re-partition queries
|
||||
-> MapMergeJob
|
||||
Map Task Count: 4
|
||||
Merge Task Count: 4
|
||||
-> MapMergeJob
|
||||
Map Task Count: 16
|
||||
Merge Task Count: 4
|
||||
-> MapMergeJob
|
||||
Map Task Count: 1
|
||||
Merge Task Count: 4
|
||||
-> MapMergeJob
|
||||
Map Task Count: 1
|
||||
Merge Task Count: 4
|
||||
Task Count: 16
|
||||
Tasks Shown: One of 16
|
||||
-> Task
|
||||
Node: host=localhost port=57637 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
|
||||
|
@ -533,26 +540,105 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
|||
"Parallel Aware": false,
|
||||
"Distributed Query": {
|
||||
"Job": {
|
||||
"Task Count": 4,
|
||||
"Tasks Shown": "None, not supported for re-partition queries",
|
||||
"Depended Jobs": [
|
||||
"Task Count": 16,
|
||||
"Tasks Shown": "One of 16",
|
||||
"Tasks": [
|
||||
{
|
||||
"Map Task Count": 4,
|
||||
"Merge Task Count": 4,
|
||||
"Depended Jobs": [
|
||||
{
|
||||
"Map Task Count": 16,
|
||||
"Merge Task Count": 4
|
||||
},
|
||||
{
|
||||
"Map Task Count": 1,
|
||||
"Merge Task Count": 4
|
||||
}
|
||||
"Node": "host=localhost port=57637 dbname=regression",
|
||||
"Remote Plan": [
|
||||
[
|
||||
{
|
||||
"Plan": {
|
||||
"Node Type": "Aggregate",
|
||||
"Strategy": "Plain",
|
||||
"Partial Mode": "Simple",
|
||||
"Parallel Aware": false,
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Hash Join",
|
||||
"Parent Relationship": "Outer",
|
||||
"Parallel Aware": 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,
|
||||
"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,
|
||||
"Relation Name": "supplier_mx_1220087",
|
||||
"Alias": "supplier_mx"
|
||||
},
|
||||
{
|
||||
"Node Type": "Hash",
|
||||
"Parent Relationship": "Inner",
|
||||
"Parallel Aware": false,
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Seq Scan",
|
||||
"Parent Relationship": "Outer",
|
||||
"Parallel Aware": false,
|
||||
"Relation Name": "lineitem_mx_1220052",
|
||||
"Alias": "lineitem_mx"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Node Type": "Hash",
|
||||
"Parent Relationship": "Inner",
|
||||
"Parallel Aware": false,
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Hash Join",
|
||||
"Parent Relationship": "Outer",
|
||||
"Parallel Aware": 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,
|
||||
"Relation Name": "customer_mx_1220084",
|
||||
"Alias": "customer_mx"
|
||||
},
|
||||
{
|
||||
"Node Type": "Hash",
|
||||
"Parent Relationship": "Inner",
|
||||
"Parallel Aware": false,
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Seq Scan",
|
||||
"Parent Relationship": "Outer",
|
||||
"Parallel Aware": false,
|
||||
"Relation Name": "orders_mx_1220068",
|
||||
"Alias": "orders_mx"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"Map Task Count": 1,
|
||||
"Merge Task Count": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -590,28 +676,106 @@ EXPLAIN (COSTS FALSE, FORMAT XML)
|
|||
<Parallel-Aware>false</Parallel-Aware>
|
||||
<Distributed-Query>
|
||||
<Job>
|
||||
<Task-Count>4</Task-Count>
|
||||
<Tasks-Shown>None, not supported for re-partition queries</Tasks-Shown>
|
||||
<Depended-Jobs>
|
||||
<MapMergeJob>
|
||||
<Map-Task-Count>4</Map-Task-Count>
|
||||
<Merge-Task-Count>4</Merge-Task-Count>
|
||||
<Depended-Jobs>
|
||||
<MapMergeJob>
|
||||
<Map-Task-Count>16</Map-Task-Count>
|
||||
<Merge-Task-Count>4</Merge-Task-Count>
|
||||
</MapMergeJob>
|
||||
<MapMergeJob>
|
||||
<Map-Task-Count>1</Map-Task-Count>
|
||||
<Merge-Task-Count>4</Merge-Task-Count>
|
||||
</MapMergeJob>
|
||||
</Depended-Jobs>
|
||||
</MapMergeJob>
|
||||
<MapMergeJob>
|
||||
<Map-Task-Count>1</Map-Task-Count>
|
||||
<Merge-Task-Count>4</Merge-Task-Count>
|
||||
</MapMergeJob>
|
||||
</Depended-Jobs>
|
||||
<Task-Count>16</Task-Count>
|
||||
<Tasks-Shown>One of 16</Tasks-Shown>
|
||||
<Tasks>
|
||||
<Task>
|
||||
<Node>host=localhost port=57637 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>
|
||||
<Plans>
|
||||
<Plan>
|
||||
<Node-Type>Hash Join</Node-Type>
|
||||
<Parent-Relationship>Outer</Parent-Relationship>
|
||||
<Parallel-Aware>false</Parallel-Aware>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<Plans>
|
||||
<Plan>
|
||||
<Node-Type>Seq Scan</Node-Type>
|
||||
<Parent-Relationship>Outer</Parent-Relationship>
|
||||
<Parallel-Aware>false</Parallel-Aware>
|
||||
<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>
|
||||
<Plans>
|
||||
<Plan>
|
||||
<Node-Type>Hash Join</Node-Type>
|
||||
<Parent-Relationship>Outer</Parent-Relationship>
|
||||
<Parallel-Aware>false</Parallel-Aware>
|
||||
<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>
|
||||
<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>
|
||||
<Plans>
|
||||
<Plan>
|
||||
<Node-Type>Seq Scan</Node-Type>
|
||||
<Parent-Relationship>Outer</Parent-Relationship>
|
||||
<Parallel-Aware>false</Parallel-Aware>
|
||||
<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>
|
||||
|
@ -644,15 +808,68 @@ EXPLAIN (COSTS FALSE, FORMAT YAML)
|
|||
Parallel Aware: false
|
||||
Distributed Query:
|
||||
Job:
|
||||
Task Count: 4
|
||||
Tasks Shown: "None, not supported for re-partition queries"
|
||||
Depended Jobs:
|
||||
- Map Task Count: 4
|
||||
Merge Task Count: 4
|
||||
Depended Jobs:
|
||||
- Map Task Count: 16
|
||||
Merge Task Count: 4
|
||||
- Map Task Count: 1
|
||||
Merge Task Count: 4
|
||||
- Map Task Count: 1
|
||||
Merge Task Count: 4
|
||||
Task Count: 16
|
||||
Tasks Shown: "One of 16"
|
||||
Tasks:
|
||||
- Node: "host=localhost port=57637 dbname=regression"
|
||||
Remote Plan:
|
||||
- Plan:
|
||||
Node Type: "Aggregate"
|
||||
Strategy: "Plain"
|
||||
Partial Mode: "Simple"
|
||||
Parallel Aware: false
|
||||
Plans:
|
||||
- Node Type: "Hash Join"
|
||||
Parent Relationship: "Outer"
|
||||
Parallel Aware: 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
|
||||
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
|
||||
Relation Name: "supplier_mx_1220087"
|
||||
Alias: "supplier_mx"
|
||||
- Node Type: "Hash"
|
||||
Parent Relationship: "Inner"
|
||||
Parallel Aware: false
|
||||
Plans:
|
||||
- Node Type: "Seq Scan"
|
||||
Parent Relationship: "Outer"
|
||||
Parallel Aware: false
|
||||
Relation Name: "lineitem_mx_1220052"
|
||||
Alias: "lineitem_mx"
|
||||
- Node Type: "Hash"
|
||||
Parent Relationship: "Inner"
|
||||
Parallel Aware: false
|
||||
Plans:
|
||||
- Node Type: "Hash Join"
|
||||
Parent Relationship: "Outer"
|
||||
Parallel Aware: 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
|
||||
Relation Name: "customer_mx_1220084"
|
||||
Alias: "customer_mx"
|
||||
- Node Type: "Hash"
|
||||
Parent Relationship: "Inner"
|
||||
Parallel Aware: false
|
||||
Plans:
|
||||
- Node Type: "Seq Scan"
|
||||
Parent Relationship: "Outer"
|
||||
Parallel Aware: false
|
||||
Relation Name: "orders_mx_1220068"
|
||||
Alias: "orders_mx"
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ 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((sum((COALESCE((sum(remote_scan.count_quantity))::bigint, '0'::bigint))))::bigint, '0'::bigint), remote_scan.l_quantity
|
||||
Sort Key: COALESCE((pg_catalog.sum((COALESCE((pg_catalog.sum(remote_scan.count_quantity))::bigint, '0'::bigint))))::bigint, '0'::bigint), remote_scan.l_quantity
|
||||
-> HashAggregate
|
||||
Group Key: remote_scan.l_quantity
|
||||
-> Custom Scan (Citus Real-Time)
|
||||
|
@ -78,18 +78,22 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
|||
{
|
||||
"Plan": {
|
||||
"Node Type": "Sort",
|
||||
"Sort Key": ["COALESCE((sum((COALESCE((sum(remote_scan.count_quantity))::bigint, '0'::bigint))))::bigint, '0'::bigint)", "remote_scan.l_quantity"],
|
||||
"Parallel Aware": false,
|
||||
"Sort Key": ["COALESCE((pg_catalog.sum((COALESCE((pg_catalog.sum(remote_scan.count_quantity))::bigint, '0'::bigint))))::bigint, '0'::bigint)", "remote_scan.l_quantity"],
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Aggregate",
|
||||
"Strategy": "Hashed",
|
||||
"Partial Mode": "Simple",
|
||||
"Parent Relationship": "Outer",
|
||||
"Parallel Aware": false,
|
||||
"Group Key": ["remote_scan.l_quantity"],
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Custom Scan",
|
||||
"Parent Relationship": "Outer",
|
||||
"Custom Plan Provider": "Citus Real-Time",
|
||||
"Parallel Aware": false,
|
||||
"Distributed Query": {
|
||||
"Job": {
|
||||
"Task Count": 16,
|
||||
|
@ -103,11 +107,14 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
|||
"Plan": {
|
||||
"Node Type": "Aggregate",
|
||||
"Strategy": "Hashed",
|
||||
"Partial Mode": "Simple",
|
||||
"Parallel Aware": false,
|
||||
"Group Key": ["l_quantity"],
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Seq Scan",
|
||||
"Parent Relationship": "Outer",
|
||||
"Parallel Aware": false,
|
||||
"Relation Name": "lineitem_mx_1220052",
|
||||
"Alias": "lineitem_mx"
|
||||
}
|
||||
|
@ -142,15 +149,18 @@ EXPLAIN (COSTS FALSE, FORMAT XML)
|
|||
<Query>
|
||||
<Plan>
|
||||
<Node-Type>Sort</Node-Type>
|
||||
<Parallel-Aware>false</Parallel-Aware>
|
||||
<Sort-Key>
|
||||
<Item>COALESCE((sum((COALESCE((sum(remote_scan.count_quantity))::bigint, '0'::bigint))))::bigint, '0'::bigint)</Item>
|
||||
<Item>COALESCE((pg_catalog.sum((COALESCE((pg_catalog.sum(remote_scan.count_quantity))::bigint, '0'::bigint))))::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>
|
||||
<Group-Key>
|
||||
<Item>remote_scan.l_quantity</Item>
|
||||
</Group-Key>
|
||||
|
@ -159,6 +169,7 @@ EXPLAIN (COSTS FALSE, FORMAT XML)
|
|||
<Node-Type>Custom Scan</Node-Type>
|
||||
<Parent-Relationship>Outer</Parent-Relationship>
|
||||
<Custom-Plan-Provider>Citus Real-Time</Custom-Plan-Provider>
|
||||
<Parallel-Aware>false</Parallel-Aware>
|
||||
<Distributed-Query>
|
||||
<Job>
|
||||
<Task-Count>16</Task-Count>
|
||||
|
@ -172,6 +183,8 @@ EXPLAIN (COSTS FALSE, FORMAT XML)
|
|||
<Plan>
|
||||
<Node-Type>Aggregate</Node-Type>
|
||||
<Strategy>Hashed</Strategy>
|
||||
<Partial-Mode>Simple</Partial-Mode>
|
||||
<Parallel-Aware>false</Parallel-Aware>
|
||||
<Group-Key>
|
||||
<Item>l_quantity</Item>
|
||||
</Group-Key>
|
||||
|
@ -179,6 +192,7 @@ EXPLAIN (COSTS FALSE, FORMAT XML)
|
|||
<Plan>
|
||||
<Node-Type>Seq Scan</Node-Type>
|
||||
<Parent-Relationship>Outer</Parent-Relationship>
|
||||
<Parallel-Aware>false</Parallel-Aware>
|
||||
<Relation-Name>lineitem_mx_1220052</Relation-Name>
|
||||
<Alias>lineitem_mx</Alias>
|
||||
</Plan>
|
||||
|
@ -209,19 +223,23 @@ EXPLAIN (COSTS FALSE, FORMAT YAML)
|
|||
GROUP BY l_quantity ORDER BY count_quantity, l_quantity;
|
||||
- Plan:
|
||||
Node Type: "Sort"
|
||||
Parallel Aware: false
|
||||
Sort Key:
|
||||
- "COALESCE((sum((COALESCE((sum(remote_scan.count_quantity))::bigint, '0'::bigint))))::bigint, '0'::bigint)"
|
||||
- "COALESCE((pg_catalog.sum((COALESCE((pg_catalog.sum(remote_scan.count_quantity))::bigint, '0'::bigint))))::bigint, '0'::bigint)"
|
||||
- "remote_scan.l_quantity"
|
||||
Plans:
|
||||
- Node Type: "Aggregate"
|
||||
Strategy: "Hashed"
|
||||
Partial Mode: "Simple"
|
||||
Parent Relationship: "Outer"
|
||||
Parallel Aware: false
|
||||
Group Key:
|
||||
- "remote_scan.l_quantity"
|
||||
Plans:
|
||||
- Node Type: "Custom Scan"
|
||||
Parent Relationship: "Outer"
|
||||
Custom Plan Provider: "Citus Real-Time"
|
||||
Parallel Aware: false
|
||||
Distributed Query:
|
||||
Job:
|
||||
Task Count: 16
|
||||
|
@ -232,11 +250,14 @@ EXPLAIN (COSTS FALSE, FORMAT YAML)
|
|||
- Plan:
|
||||
Node Type: "Aggregate"
|
||||
Strategy: "Hashed"
|
||||
Partial Mode: "Simple"
|
||||
Parallel Aware: false
|
||||
Group Key:
|
||||
- "l_quantity"
|
||||
Plans:
|
||||
- Node Type: "Seq Scan"
|
||||
Parent Relationship: "Outer"
|
||||
Parallel Aware: false
|
||||
Relation Name: "lineitem_mx_1220052"
|
||||
Alias: "lineitem_mx"
|
||||
|
||||
|
@ -245,7 +266,7 @@ 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((sum((COALESCE((sum(remote_scan.count_quantity))::bigint, '0'::bigint))))::bigint, '0'::bigint), remote_scan.l_quantity
|
||||
Sort Key: COALESCE((pg_catalog.sum((COALESCE((pg_catalog.sum(remote_scan.count_quantity))::bigint, '0'::bigint))))::bigint, '0'::bigint), remote_scan.l_quantity
|
||||
-> HashAggregate
|
||||
Group Key: remote_scan.l_quantity
|
||||
-> Custom Scan (Citus Real-Time)
|
||||
|
@ -261,7 +282,7 @@ Sort
|
|||
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") / sum(remote_scan."?column?_2")))
|
||||
Output: (sum(remote_scan."?column?") / (sum(remote_scan."?column?_1") / pg_catalog.sum(remote_scan."?column?_2")))
|
||||
-> Custom Scan (Citus Real-Time)
|
||||
Output: remote_scan."?column?", remote_scan."?column?_1", remote_scan."?column?_2"
|
||||
Task Count: 16
|
||||
|
@ -314,8 +335,8 @@ Custom Scan (Citus Router)
|
|||
Tasks Shown: All
|
||||
-> Task
|
||||
Node: host=localhost port=57637 dbname=regression
|
||||
-> Update on lineitem_mx_1220052
|
||||
-> Index Scan using lineitem_mx_pkey_1220052 on lineitem_mx_1220052
|
||||
-> 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
|
||||
|
@ -327,10 +348,15 @@ Custom Scan (Citus Router)
|
|||
Tasks Shown: All
|
||||
-> Task
|
||||
Node: host=localhost port=57637 dbname=regression
|
||||
-> Delete on lineitem_mx_1220052
|
||||
-> Index Scan using lineitem_mx_pkey_1220052 on lineitem_mx_1220052
|
||||
-> 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;
|
||||
|
@ -339,10 +365,8 @@ Custom Scan (Citus Router)
|
|||
Tasks Shown: All
|
||||
-> Task
|
||||
Node: host=localhost port=57638 dbname=regression
|
||||
-> Bitmap Heap Scan on lineitem_mx_1220055 lineitem_mx
|
||||
Recheck Cond: (l_orderkey = 5)
|
||||
-> Bitmap Index Scan on lineitem_mx_pkey_1220055
|
||||
Index Cond: (l_orderkey = 5)
|
||||
-> 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
|
||||
|
@ -370,68 +394,68 @@ Aggregate
|
|||
-> Task
|
||||
Node: host=localhost port=57637 dbname=regression
|
||||
-> Aggregate
|
||||
-> Seq Scan on lineitem_mx_1220052 lineitem_mx
|
||||
Filter: (l_orderkey > 9030)
|
||||
-> Index Only Scan using lineitem_mx_pkey_1220052 on lineitem_mx_1220052 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-> Task
|
||||
Node: host=localhost port=57638 dbname=regression
|
||||
-> Aggregate
|
||||
-> Seq Scan on lineitem_mx_1220053 lineitem_mx
|
||||
Filter: (l_orderkey > 9030)
|
||||
-> Index Only Scan using lineitem_mx_pkey_1220053 on lineitem_mx_1220053 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-> Task
|
||||
Node: host=localhost port=57637 dbname=regression
|
||||
-> Aggregate
|
||||
-> Seq Scan on lineitem_mx_1220054 lineitem_mx
|
||||
Filter: (l_orderkey > 9030)
|
||||
-> Index Only Scan using lineitem_mx_pkey_1220054 on lineitem_mx_1220054 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-> Task
|
||||
Node: host=localhost port=57638 dbname=regression
|
||||
-> Aggregate
|
||||
-> Seq Scan on lineitem_mx_1220055 lineitem_mx
|
||||
Filter: (l_orderkey > 9030)
|
||||
-> Index Only Scan using lineitem_mx_pkey_1220055 on lineitem_mx_1220055 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-> Task
|
||||
Node: host=localhost port=57637 dbname=regression
|
||||
-> Aggregate
|
||||
-> Seq Scan on lineitem_mx_1220056 lineitem_mx
|
||||
Filter: (l_orderkey > 9030)
|
||||
-> Index Only Scan using lineitem_mx_pkey_1220056 on lineitem_mx_1220056 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-> Task
|
||||
Node: host=localhost port=57638 dbname=regression
|
||||
-> Aggregate
|
||||
-> Seq Scan on lineitem_mx_1220057 lineitem_mx
|
||||
Filter: (l_orderkey > 9030)
|
||||
-> Index Only Scan using lineitem_mx_pkey_1220057 on lineitem_mx_1220057 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-> Task
|
||||
Node: host=localhost port=57637 dbname=regression
|
||||
-> Aggregate
|
||||
-> Seq Scan on lineitem_mx_1220058 lineitem_mx
|
||||
Filter: (l_orderkey > 9030)
|
||||
-> Index Only Scan using lineitem_mx_pkey_1220058 on lineitem_mx_1220058 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-> Task
|
||||
Node: host=localhost port=57638 dbname=regression
|
||||
-> Aggregate
|
||||
-> Seq Scan on lineitem_mx_1220059 lineitem_mx
|
||||
Filter: (l_orderkey > 9030)
|
||||
-> Index Only Scan using lineitem_mx_pkey_1220059 on lineitem_mx_1220059 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-> Task
|
||||
Node: host=localhost port=57637 dbname=regression
|
||||
-> Aggregate
|
||||
-> Seq Scan on lineitem_mx_1220060 lineitem_mx
|
||||
Filter: (l_orderkey > 9030)
|
||||
-> Index Only Scan using lineitem_mx_pkey_1220060 on lineitem_mx_1220060 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-> Task
|
||||
Node: host=localhost port=57638 dbname=regression
|
||||
-> Aggregate
|
||||
-> Seq Scan on lineitem_mx_1220061 lineitem_mx
|
||||
Filter: (l_orderkey > 9030)
|
||||
-> Index Only Scan using lineitem_mx_pkey_1220061 on lineitem_mx_1220061 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-> Task
|
||||
Node: host=localhost port=57637 dbname=regression
|
||||
-> Aggregate
|
||||
-> Seq Scan on lineitem_mx_1220062 lineitem_mx
|
||||
Filter: (l_orderkey > 9030)
|
||||
-> Index Only Scan using lineitem_mx_pkey_1220062 on lineitem_mx_1220062 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-> Task
|
||||
Node: host=localhost port=57638 dbname=regression
|
||||
-> Aggregate
|
||||
-> Seq Scan on lineitem_mx_1220063 lineitem_mx
|
||||
Filter: (l_orderkey > 9030)
|
||||
-> Index Only Scan using lineitem_mx_pkey_1220063 on lineitem_mx_1220063 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-> Task
|
||||
Node: host=localhost port=57637 dbname=regression
|
||||
-> Aggregate
|
||||
-> Seq Scan on lineitem_mx_1220064 lineitem_mx
|
||||
Filter: (l_orderkey > 9030)
|
||||
-> Index Only Scan using lineitem_mx_pkey_1220064 on lineitem_mx_1220064 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-> Task
|
||||
Node: host=localhost port=57638 dbname=regression
|
||||
-> Aggregate
|
||||
|
@ -440,13 +464,13 @@ Aggregate
|
|||
-> Task
|
||||
Node: host=localhost port=57637 dbname=regression
|
||||
-> Aggregate
|
||||
-> Seq Scan on lineitem_mx_1220066 lineitem_mx
|
||||
Filter: (l_orderkey > 9030)
|
||||
-> Index Only Scan using lineitem_mx_pkey_1220066 on lineitem_mx_1220066 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-> Task
|
||||
Node: host=localhost port=57638 dbname=regression
|
||||
-> Aggregate
|
||||
-> Seq Scan on lineitem_mx_1220067 lineitem_mx
|
||||
Filter: (l_orderkey > 9030)
|
||||
-> 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
|
||||
|
@ -465,8 +489,8 @@ Aggregate
|
|||
-> Task
|
||||
Node: host=localhost port=57637 dbname=regression
|
||||
-> Aggregate
|
||||
-> Seq Scan on lineitem_mx_1220052 lineitem_mx
|
||||
Filter: (l_orderkey > 9030)
|
||||
-> Index Only Scan using lineitem_mx_pkey_1220052 on lineitem_mx_1220052 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-- Test re-partition join
|
||||
SET citus.large_table_shard_count TO 1;
|
||||
EXPLAIN (COSTS FALSE)
|
||||
|
@ -477,20 +501,24 @@ EXPLAIN (COSTS FALSE)
|
|||
AND l_suppkey = s_suppkey;
|
||||
Aggregate
|
||||
-> Custom Scan (Citus Task-Tracker)
|
||||
Task Count: 4
|
||||
Tasks Shown: None, not supported for re-partition queries
|
||||
-> MapMergeJob
|
||||
Map Task Count: 4
|
||||
Merge Task Count: 4
|
||||
-> MapMergeJob
|
||||
Map Task Count: 16
|
||||
Merge Task Count: 4
|
||||
-> MapMergeJob
|
||||
Map Task Count: 1
|
||||
Merge Task Count: 4
|
||||
-> MapMergeJob
|
||||
Map Task Count: 1
|
||||
Merge Task Count: 4
|
||||
Task Count: 16
|
||||
Tasks Shown: One of 16
|
||||
-> Task
|
||||
Node: host=localhost port=57637 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
|
||||
|
@ -502,33 +530,112 @@ EXPLAIN (COSTS FALSE, FORMAT JSON)
|
|||
"Plan": {
|
||||
"Node Type": "Aggregate",
|
||||
"Strategy": "Plain",
|
||||
"Partial Mode": "Simple",
|
||||
"Parallel Aware": false,
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Custom Scan",
|
||||
"Parent Relationship": "Outer",
|
||||
"Custom Plan Provider": "Citus Task-Tracker",
|
||||
"Parallel Aware": false,
|
||||
"Distributed Query": {
|
||||
"Job": {
|
||||
"Task Count": 4,
|
||||
"Tasks Shown": "None, not supported for re-partition queries",
|
||||
"Depended Jobs": [
|
||||
"Task Count": 16,
|
||||
"Tasks Shown": "One of 16",
|
||||
"Tasks": [
|
||||
{
|
||||
"Map Task Count": 4,
|
||||
"Merge Task Count": 4,
|
||||
"Depended Jobs": [
|
||||
{
|
||||
"Map Task Count": 16,
|
||||
"Merge Task Count": 4
|
||||
},
|
||||
{
|
||||
"Map Task Count": 1,
|
||||
"Merge Task Count": 4
|
||||
}
|
||||
"Node": "host=localhost port=57637 dbname=regression",
|
||||
"Remote Plan": [
|
||||
[
|
||||
{
|
||||
"Plan": {
|
||||
"Node Type": "Aggregate",
|
||||
"Strategy": "Plain",
|
||||
"Partial Mode": "Simple",
|
||||
"Parallel Aware": false,
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Hash Join",
|
||||
"Parent Relationship": "Outer",
|
||||
"Parallel Aware": false,
|
||||
"Join Type": "Inner",
|
||||
"Hash Cond": "(lineitem_mx.l_orderkey = orders_mx.o_orderkey)",
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Hash Join",
|
||||
"Parent Relationship": "Outer",
|
||||
"Parallel Aware": false,
|
||||
"Join Type": "Inner",
|
||||
"Hash Cond": "(supplier_mx.s_suppkey = lineitem_mx.l_suppkey)",
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Seq Scan",
|
||||
"Parent Relationship": "Outer",
|
||||
"Parallel Aware": false,
|
||||
"Relation Name": "supplier_mx_1220087",
|
||||
"Alias": "supplier_mx"
|
||||
},
|
||||
{
|
||||
"Node Type": "Hash",
|
||||
"Parent Relationship": "Inner",
|
||||
"Parallel Aware": false,
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Seq Scan",
|
||||
"Parent Relationship": "Outer",
|
||||
"Parallel Aware": false,
|
||||
"Relation Name": "lineitem_mx_1220052",
|
||||
"Alias": "lineitem_mx"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Node Type": "Hash",
|
||||
"Parent Relationship": "Inner",
|
||||
"Parallel Aware": false,
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Hash Join",
|
||||
"Parent Relationship": "Outer",
|
||||
"Parallel Aware": false,
|
||||
"Join Type": "Inner",
|
||||
"Hash Cond": "(customer_mx.c_custkey = orders_mx.o_custkey)",
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Seq Scan",
|
||||
"Parent Relationship": "Outer",
|
||||
"Parallel Aware": false,
|
||||
"Relation Name": "customer_mx_1220084",
|
||||
"Alias": "customer_mx"
|
||||
},
|
||||
{
|
||||
"Node Type": "Hash",
|
||||
"Parent Relationship": "Inner",
|
||||
"Parallel Aware": false,
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Seq Scan",
|
||||
"Parent Relationship": "Outer",
|
||||
"Parallel Aware": false,
|
||||
"Relation Name": "orders_mx_1220068",
|
||||
"Alias": "orders_mx"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"Map Task Count": 1,
|
||||
"Merge Task Count": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -556,35 +663,113 @@ EXPLAIN (COSTS FALSE, FORMAT XML)
|
|||
<Plan>
|
||||
<Node-Type>Aggregate</Node-Type>
|
||||
<Strategy>Plain</Strategy>
|
||||
<Partial-Mode>Simple</Partial-Mode>
|
||||
<Parallel-Aware>false</Parallel-Aware>
|
||||
<Plans>
|
||||
<Plan>
|
||||
<Node-Type>Custom Scan</Node-Type>
|
||||
<Parent-Relationship>Outer</Parent-Relationship>
|
||||
<Custom-Plan-Provider>Citus Task-Tracker</Custom-Plan-Provider>
|
||||
<Parallel-Aware>false</Parallel-Aware>
|
||||
<Distributed-Query>
|
||||
<Job>
|
||||
<Task-Count>4</Task-Count>
|
||||
<Tasks-Shown>None, not supported for re-partition queries</Tasks-Shown>
|
||||
<Depended-Jobs>
|
||||
<MapMergeJob>
|
||||
<Map-Task-Count>4</Map-Task-Count>
|
||||
<Merge-Task-Count>4</Merge-Task-Count>
|
||||
<Depended-Jobs>
|
||||
<MapMergeJob>
|
||||
<Map-Task-Count>16</Map-Task-Count>
|
||||
<Merge-Task-Count>4</Merge-Task-Count>
|
||||
</MapMergeJob>
|
||||
<MapMergeJob>
|
||||
<Map-Task-Count>1</Map-Task-Count>
|
||||
<Merge-Task-Count>4</Merge-Task-Count>
|
||||
</MapMergeJob>
|
||||
</Depended-Jobs>
|
||||
</MapMergeJob>
|
||||
<MapMergeJob>
|
||||
<Map-Task-Count>1</Map-Task-Count>
|
||||
<Merge-Task-Count>4</Merge-Task-Count>
|
||||
</MapMergeJob>
|
||||
</Depended-Jobs>
|
||||
<Task-Count>16</Task-Count>
|
||||
<Tasks-Shown>One of 16</Tasks-Shown>
|
||||
<Tasks>
|
||||
<Task>
|
||||
<Node>host=localhost port=57637 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>
|
||||
<Plans>
|
||||
<Plan>
|
||||
<Node-Type>Hash Join</Node-Type>
|
||||
<Parent-Relationship>Outer</Parent-Relationship>
|
||||
<Parallel-Aware>false</Parallel-Aware>
|
||||
<Join-Type>Inner</Join-Type>
|
||||
<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>
|
||||
<Join-Type>Inner</Join-Type>
|
||||
<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>
|
||||
<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>
|
||||
<Plans>
|
||||
<Plan>
|
||||
<Node-Type>Seq Scan</Node-Type>
|
||||
<Parent-Relationship>Outer</Parent-Relationship>
|
||||
<Parallel-Aware>false</Parallel-Aware>
|
||||
<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>
|
||||
<Plans>
|
||||
<Plan>
|
||||
<Node-Type>Hash Join</Node-Type>
|
||||
<Parent-Relationship>Outer</Parent-Relationship>
|
||||
<Parallel-Aware>false</Parallel-Aware>
|
||||
<Join-Type>Inner</Join-Type>
|
||||
<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>
|
||||
<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>
|
||||
<Plans>
|
||||
<Plan>
|
||||
<Node-Type>Seq Scan</Node-Type>
|
||||
<Parent-Relationship>Outer</Parent-Relationship>
|
||||
<Parallel-Aware>false</Parallel-Aware>
|
||||
<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>
|
||||
|
@ -608,21 +793,74 @@ EXPLAIN (COSTS FALSE, FORMAT YAML)
|
|||
- Plan:
|
||||
Node Type: "Aggregate"
|
||||
Strategy: "Plain"
|
||||
Partial Mode: "Simple"
|
||||
Parallel Aware: false
|
||||
Plans:
|
||||
- Node Type: "Custom Scan"
|
||||
Parent Relationship: "Outer"
|
||||
Custom Plan Provider: "Citus Task-Tracker"
|
||||
Parallel Aware: false
|
||||
Distributed Query:
|
||||
Job:
|
||||
Task Count: 4
|
||||
Tasks Shown: "None, not supported for re-partition queries"
|
||||
Depended Jobs:
|
||||
- Map Task Count: 4
|
||||
Merge Task Count: 4
|
||||
Depended Jobs:
|
||||
- Map Task Count: 16
|
||||
Merge Task Count: 4
|
||||
- Map Task Count: 1
|
||||
Merge Task Count: 4
|
||||
- Map Task Count: 1
|
||||
Merge Task Count: 4
|
||||
Task Count: 16
|
||||
Tasks Shown: "One of 16"
|
||||
Tasks:
|
||||
- Node: "host=localhost port=57637 dbname=regression"
|
||||
Remote Plan:
|
||||
- Plan:
|
||||
Node Type: "Aggregate"
|
||||
Strategy: "Plain"
|
||||
Partial Mode: "Simple"
|
||||
Parallel Aware: false
|
||||
Plans:
|
||||
- Node Type: "Hash Join"
|
||||
Parent Relationship: "Outer"
|
||||
Parallel Aware: false
|
||||
Join Type: "Inner"
|
||||
Hash Cond: "(lineitem_mx.l_orderkey = orders_mx.o_orderkey)"
|
||||
Plans:
|
||||
- Node Type: "Hash Join"
|
||||
Parent Relationship: "Outer"
|
||||
Parallel Aware: false
|
||||
Join Type: "Inner"
|
||||
Hash Cond: "(supplier_mx.s_suppkey = lineitem_mx.l_suppkey)"
|
||||
Plans:
|
||||
- Node Type: "Seq Scan"
|
||||
Parent Relationship: "Outer"
|
||||
Parallel Aware: false
|
||||
Relation Name: "supplier_mx_1220087"
|
||||
Alias: "supplier_mx"
|
||||
- Node Type: "Hash"
|
||||
Parent Relationship: "Inner"
|
||||
Parallel Aware: false
|
||||
Plans:
|
||||
- Node Type: "Seq Scan"
|
||||
Parent Relationship: "Outer"
|
||||
Parallel Aware: false
|
||||
Relation Name: "lineitem_mx_1220052"
|
||||
Alias: "lineitem_mx"
|
||||
- Node Type: "Hash"
|
||||
Parent Relationship: "Inner"
|
||||
Parallel Aware: false
|
||||
Plans:
|
||||
- Node Type: "Hash Join"
|
||||
Parent Relationship: "Outer"
|
||||
Parallel Aware: false
|
||||
Join Type: "Inner"
|
||||
Hash Cond: "(customer_mx.c_custkey = orders_mx.o_custkey)"
|
||||
Plans:
|
||||
- Node Type: "Seq Scan"
|
||||
Parent Relationship: "Outer"
|
||||
Parallel Aware: false
|
||||
Relation Name: "customer_mx_1220084"
|
||||
Alias: "customer_mx"
|
||||
- Node Type: "Hash"
|
||||
Parent Relationship: "Inner"
|
||||
Parallel Aware: false
|
||||
Plans:
|
||||
- Node Type: "Seq Scan"
|
||||
Parent Relationship: "Outer"
|
||||
Parallel Aware: false
|
||||
Relation Name: "orders_mx_1220068"
|
||||
Alias: "orders_mx"
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ SET search_path TO public;
|
|||
\COPY orders_mx FROM '@abs_srcdir@/data/orders.1.data' with delimiter '|'
|
||||
\COPY orders_mx FROM '@abs_srcdir@/data/orders.2.data' with delimiter '|'
|
||||
|
||||
-- and use second worker as well
|
||||
\c - - - :worker_2_port
|
||||
-- and use coordinator for reference tables
|
||||
\c - - - :master_port
|
||||
SET search_path TO public;
|
||||
|
||||
\COPY customer_mx FROM '@abs_srcdir@/data/customer.1.data' with delimiter '|'
|
||||
|
|
|
@ -14,8 +14,8 @@ SET search_path TO public;
|
|||
\COPY lineitem_mx FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|'
|
||||
\COPY orders_mx FROM '@abs_srcdir@/data/orders.1.data' with delimiter '|'
|
||||
\COPY orders_mx FROM '@abs_srcdir@/data/orders.2.data' with delimiter '|'
|
||||
-- and use second worker as well
|
||||
\c - - - :worker_2_port
|
||||
-- and use coordinator for reference tables
|
||||
\c - - - :master_port
|
||||
SET search_path TO public;
|
||||
\COPY customer_mx FROM '@abs_srcdir@/data/customer.1.data' with delimiter '|'
|
||||
\COPY nation_mx FROM '@abs_srcdir@/data/nation.data' with delimiter '|'
|
||||
|
|
|
@ -306,8 +306,7 @@ CREATE TABLE customer_mx (
|
|||
c_mktsegment char(10) not null,
|
||||
c_comment varchar(117) not null);
|
||||
|
||||
SET citus.shard_count TO 1;
|
||||
SELECT create_distributed_table('customer_mx', 'c_custkey');
|
||||
SELECT create_reference_table('customer_mx');
|
||||
|
||||
CREATE TABLE nation_mx (
|
||||
n_nationkey integer not null,
|
||||
|
@ -315,7 +314,7 @@ CREATE TABLE nation_mx (
|
|||
n_regionkey integer not null,
|
||||
n_comment varchar(152));
|
||||
|
||||
SELECT create_distributed_table('nation_mx', 'n_nationkey');
|
||||
SELECT create_reference_table('nation_mx');
|
||||
|
||||
CREATE TABLE part_mx (
|
||||
p_partkey integer not null,
|
||||
|
@ -328,7 +327,7 @@ CREATE TABLE part_mx (
|
|||
p_retailprice decimal(15,2) not null,
|
||||
p_comment varchar(23) not null);
|
||||
|
||||
SELECT create_distributed_table('part_mx', 'p_partkey');
|
||||
SELECT create_reference_table('part_mx');
|
||||
|
||||
CREATE TABLE supplier_mx
|
||||
(
|
||||
|
@ -341,7 +340,7 @@ CREATE TABLE supplier_mx
|
|||
s_comment varchar(101) not null
|
||||
);
|
||||
|
||||
SELECT create_distributed_table('supplier_mx', 's_suppkey');
|
||||
SELECT create_reference_table('supplier_mx');
|
||||
|
||||
-- Create test table for ddl
|
||||
CREATE TABLE mx_ddl_table (
|
||||
|
|
|
@ -129,6 +129,9 @@ EXPLAIN (COSTS FALSE)
|
|||
|
||||
-- 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)
|
||||
|
|
Loading…
Reference in New Issue