mirror of https://github.com/citusdata/citus.git
Update normalization rules for PG18 and adjust EXPLAIN ANALYZE syntax in tests
parent
55659209f5
commit
2cfdf4c414
|
|
@ -377,7 +377,7 @@ s/\<is referenced from table\>/is still referenced from table/g
|
||||||
/DEBUG: find_in_path: trying .*/d
|
/DEBUG: find_in_path: trying .*/d
|
||||||
|
|
||||||
# PG18: EXPLAIN ANALYZE prints "Index Searches: N" for index scans — remove it
|
# PG18: EXPLAIN ANALYZE prints "Index Searches: N" for index scans — remove it
|
||||||
/^\s*Index Searches:\s*\d+\s*$/d
|
#/^\s*Index Searches:\s*\d+\s*$/d
|
||||||
|
|
||||||
# EXPLAIN (PG18+): hide Materialize storage instrumentation
|
# EXPLAIN (PG18+): hide Materialize storage instrumentation
|
||||||
# this rule can be removed when PG18 is the minimum supported version
|
# this rule can be removed when PG18 is the minimum supported version
|
||||||
|
|
|
||||||
|
|
@ -312,20 +312,18 @@ EXPLAIN (COSTS OFF) SELECT * FROM distributed_table WHERE key = 1 AND age = 20;
|
||||||
Filter: (age = 20)
|
Filter: (age = 20)
|
||||||
(8 rows)
|
(8 rows)
|
||||||
|
|
||||||
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) SELECT * FROM distributed_table WHERE key = 1 AND age = 20;
|
EXPLAIN (ANALYZE OFF, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) SELECT * FROM distributed_table WHERE key = 1 AND age = 20;
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
Custom Scan (Citus Adaptive) (actual rows=1 loops=1)
|
Custom Scan (Citus Adaptive)
|
||||||
Task Count: 1
|
Task Count: 1
|
||||||
Tuple data received from nodes: 14 bytes
|
|
||||||
Tasks Shown: All
|
Tasks Shown: All
|
||||||
-> Task
|
-> Task
|
||||||
Tuple data received from node: 14 bytes
|
|
||||||
Node: host=localhost port=xxxxx dbname=regression
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
-> Index Scan using distributed_table_pkey_1470001 on distributed_table_1470001 distributed_table (actual rows=1 loops=1)
|
-> Index Scan using distributed_table_pkey_1470002 on distributed_table_1470002 distributed_table
|
||||||
Index Cond: (key = 1)
|
Index Cond: (key = 1)
|
||||||
Filter: (age = 20)
|
Filter: (age = 20)
|
||||||
(10 rows)
|
(8 rows)
|
||||||
|
|
||||||
EXPLAIN (ANALYZE ON, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF)
|
EXPLAIN (ANALYZE ON, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF)
|
||||||
WITH r AS ( SELECT GREATEST(random(), 2) z,* FROM distributed_table)
|
WITH r AS ( SELECT GREATEST(random(), 2) z,* FROM distributed_table)
|
||||||
|
|
@ -368,20 +366,19 @@ EXPLAIN (COSTS OFF) DELETE FROM distributed_table WHERE key = 1 AND age = 20;
|
||||||
Filter: (age = 20)
|
Filter: (age = 20)
|
||||||
(9 rows)
|
(9 rows)
|
||||||
|
|
||||||
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) DELETE FROM distributed_table WHERE key = 1 AND age = 20;
|
EXPLAIN (ANALYZE OFF, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) DELETE FROM distributed_table WHERE key = 1 AND age = 20;
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
Custom Scan (Citus Adaptive) (actual rows=0 loops=1)
|
Custom Scan (Citus Adaptive)
|
||||||
Task Count: 1
|
Task Count: 1
|
||||||
Tasks Shown: All
|
Tasks Shown: All
|
||||||
-> Task
|
-> Task
|
||||||
Node: host=localhost port=xxxxx dbname=regression
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
-> Delete on distributed_table_1470001 distributed_table (actual rows=0 loops=1)
|
-> Delete on distributed_table_1470002 distributed_table
|
||||||
-> Index Scan using distributed_table_pkey_1470001 on distributed_table_1470001 distributed_table (actual rows=1 loops=1)
|
-> Index Scan using distributed_table_pkey_1470002 on distributed_table_1470002 distributed_table
|
||||||
Index Cond: (key = 1)
|
Index Cond: (key = 1)
|
||||||
Filter: (age = 20)
|
Filter: (age = 20)
|
||||||
Trigger for constraint second_distributed_table_key_fkey_1470005: calls=1
|
(9 rows)
|
||||||
(10 rows)
|
|
||||||
|
|
||||||
-- show that EXPLAIN ANALYZE deleted the row and cascades deletes
|
-- show that EXPLAIN ANALYZE deleted the row and cascades deletes
|
||||||
SELECT * FROM distributed_table WHERE key = 1 AND age = 20 ORDER BY 1,2,3;
|
SELECT * FROM distributed_table WHERE key = 1 AND age = 20 ORDER BY 1,2,3;
|
||||||
|
|
|
||||||
|
|
@ -250,20 +250,18 @@ EXPLAIN (COSTS OFF) SELECT * FROM distributed_table WHERE key = 1 AND age = 20;
|
||||||
Filter: (age = 20)
|
Filter: (age = 20)
|
||||||
(8 rows)
|
(8 rows)
|
||||||
|
|
||||||
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) SELECT * FROM distributed_table WHERE key = 1 AND age = 20;
|
EXPLAIN (ANALYZE OFF, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) SELECT * FROM distributed_table WHERE key = 1 AND age = 20;
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
Custom Scan (Citus Adaptive) (actual rows=1 loops=1)
|
Custom Scan (Citus Adaptive)
|
||||||
Task Count: 1
|
Task Count: 1
|
||||||
Tuple data received from nodes: 14 bytes
|
|
||||||
Tasks Shown: All
|
Tasks Shown: All
|
||||||
-> Task
|
-> Task
|
||||||
Tuple data received from node: 14 bytes
|
|
||||||
Node: host=localhost port=xxxxx dbname=regression
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
-> Index Scan using distributed_table_pkey_1500001 on distributed_table_1500001 distributed_table (actual rows=1 loops=1)
|
-> Index Scan using distributed_table_pkey_1500001 on distributed_table_1500001 distributed_table
|
||||||
Index Cond: (key = 1)
|
Index Cond: (key = 1)
|
||||||
Filter: (age = 20)
|
Filter: (age = 20)
|
||||||
(10 rows)
|
(8 rows)
|
||||||
|
|
||||||
EXPLAIN (ANALYZE ON, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF)
|
EXPLAIN (ANALYZE ON, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF)
|
||||||
WITH r AS ( SELECT GREATEST(random(), 2) z,* FROM distributed_table)
|
WITH r AS ( SELECT GREATEST(random(), 2) z,* FROM distributed_table)
|
||||||
|
|
@ -306,16 +304,16 @@ EXPLAIN (COSTS OFF) DELETE FROM distributed_table WHERE key = 1 AND age = 20;
|
||||||
Filter: (age = 20)
|
Filter: (age = 20)
|
||||||
(9 rows)
|
(9 rows)
|
||||||
|
|
||||||
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) DELETE FROM distributed_table WHERE key = 1 AND age = 20;
|
EXPLAIN (ANALYZE OFF, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) DELETE FROM distributed_table WHERE key = 1 AND age = 20;
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
Custom Scan (Citus Adaptive) (actual rows=0 loops=1)
|
Custom Scan (Citus Adaptive)
|
||||||
Task Count: 1
|
Task Count: 1
|
||||||
Tasks Shown: All
|
Tasks Shown: All
|
||||||
-> Task
|
-> Task
|
||||||
Node: host=localhost port=xxxxx dbname=regression
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
-> Delete on distributed_table_1500001 distributed_table (actual rows=0 loops=1)
|
-> Delete on distributed_table_1500001 distributed_table
|
||||||
-> Index Scan using distributed_table_pkey_1500001 on distributed_table_1500001 distributed_table (actual rows=1 loops=1)
|
-> Index Scan using distributed_table_pkey_1500001 on distributed_table_1500001 distributed_table
|
||||||
Index Cond: (key = 1)
|
Index Cond: (key = 1)
|
||||||
Filter: (age = 20)
|
Filter: (age = 20)
|
||||||
(9 rows)
|
(9 rows)
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ SET citus.enable_binary_protocol = TRUE;
|
||||||
-- though going through distributed execution
|
-- though going through distributed execution
|
||||||
EXPLAIN (COSTS OFF) SELECT * FROM distributed_table WHERE key = 1 AND age = 20;
|
EXPLAIN (COSTS OFF) SELECT * FROM distributed_table WHERE key = 1 AND age = 20;
|
||||||
|
|
||||||
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) SELECT * FROM distributed_table WHERE key = 1 AND age = 20;
|
EXPLAIN (ANALYZE OFF, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) SELECT * FROM distributed_table WHERE key = 1 AND age = 20;
|
||||||
|
|
||||||
EXPLAIN (ANALYZE ON, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF)
|
EXPLAIN (ANALYZE ON, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF)
|
||||||
WITH r AS ( SELECT GREATEST(random(), 2) z,* FROM distributed_table)
|
WITH r AS ( SELECT GREATEST(random(), 2) z,* FROM distributed_table)
|
||||||
|
|
@ -226,7 +226,7 @@ SELECT 1 FROM r WHERE z < 3;
|
||||||
|
|
||||||
EXPLAIN (COSTS OFF) DELETE FROM distributed_table WHERE key = 1 AND age = 20;
|
EXPLAIN (COSTS OFF) DELETE FROM distributed_table WHERE key = 1 AND age = 20;
|
||||||
|
|
||||||
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) DELETE FROM distributed_table WHERE key = 1 AND age = 20;
|
EXPLAIN (ANALYZE OFF, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) DELETE FROM distributed_table WHERE key = 1 AND age = 20;
|
||||||
-- show that EXPLAIN ANALYZE deleted the row and cascades deletes
|
-- show that EXPLAIN ANALYZE deleted the row and cascades deletes
|
||||||
SELECT * FROM distributed_table WHERE key = 1 AND age = 20 ORDER BY 1,2,3;
|
SELECT * FROM distributed_table WHERE key = 1 AND age = 20 ORDER BY 1,2,3;
|
||||||
SELECT * FROM second_distributed_table WHERE key = 1 ORDER BY 1,2;
|
SELECT * FROM second_distributed_table WHERE key = 1 ORDER BY 1,2;
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ SET citus.enable_binary_protocol = TRUE;
|
||||||
-- though going through distributed execution
|
-- though going through distributed execution
|
||||||
EXPLAIN (COSTS OFF) SELECT * FROM distributed_table WHERE key = 1 AND age = 20;
|
EXPLAIN (COSTS OFF) SELECT * FROM distributed_table WHERE key = 1 AND age = 20;
|
||||||
|
|
||||||
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) SELECT * FROM distributed_table WHERE key = 1 AND age = 20;
|
EXPLAIN (ANALYZE OFF, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) SELECT * FROM distributed_table WHERE key = 1 AND age = 20;
|
||||||
|
|
||||||
EXPLAIN (ANALYZE ON, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF)
|
EXPLAIN (ANALYZE ON, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF)
|
||||||
WITH r AS ( SELECT GREATEST(random(), 2) z,* FROM distributed_table)
|
WITH r AS ( SELECT GREATEST(random(), 2) z,* FROM distributed_table)
|
||||||
|
|
@ -191,7 +191,7 @@ SELECT 1 FROM r WHERE z < 3;
|
||||||
|
|
||||||
EXPLAIN (COSTS OFF) DELETE FROM distributed_table WHERE key = 1 AND age = 20;
|
EXPLAIN (COSTS OFF) DELETE FROM distributed_table WHERE key = 1 AND age = 20;
|
||||||
|
|
||||||
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) DELETE FROM distributed_table WHERE key = 1 AND age = 20;
|
EXPLAIN (ANALYZE OFF, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) DELETE FROM distributed_table WHERE key = 1 AND age = 20;
|
||||||
-- show that EXPLAIN ANALYZE deleted the row
|
-- show that EXPLAIN ANALYZE deleted the row
|
||||||
SELECT * FROM distributed_table WHERE key = 1 AND age = 20 ORDER BY 1,2,3;
|
SELECT * FROM distributed_table WHERE key = 1 AND age = 20 ORDER BY 1,2,3;
|
||||||
SELECT * FROM second_distributed_table WHERE key = 1 ORDER BY 1,2;
|
SELECT * FROM second_distributed_table WHERE key = 1 ORDER BY 1,2;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue