fastcheck不在parallel0的部分用例修复
This commit is contained in:
@ -385,7 +385,7 @@ set enable_bitmapscan = off;
|
||||
explain select * from heap_range_order_by_tbl A INNER JOIN heap_range_order_by_tbl B ON (A.GID = B.GID) ORDER BY A.GID;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Merge Join (cost=505.89..547.91 rows=2563 width=168)
|
||||
Merge Join (cost=505.88..547.91 rows=2563 width=168)
|
||||
Merge Cond: (a.gid = b.gid)
|
||||
-> Sort (cost=252.94..254.73 rows=716 width=84)
|
||||
Sort Key: a.gid
|
||||
@ -404,7 +404,7 @@ explain select * from heap_range_order_by_tbl A INNER JOIN heap_range_order_by_t
|
||||
explain select * from heap_range_order_by_tbl A INNER JOIN heap_range_order_by_tbl B ON (A.GID = B.GID) ORDER BY A.GID DESC;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Merge Join (cost=505.89..547.91 rows=2563 width=168)
|
||||
Merge Join (cost=505.88..547.91 rows=2563 width=168)
|
||||
Merge Cond: (a.gid = b.gid)
|
||||
-> Sort (cost=252.94..254.73 rows=716 width=84)
|
||||
Sort Key: a.gid DESC
|
||||
@ -514,7 +514,7 @@ SET ENABLE_MATERIAL = ON;
|
||||
SET ENABLE_MERGEJOIN = ON;
|
||||
SET ENABLE_NESTLOOP = OFF;
|
||||
SET ENABLE_HASHJOIN = OFF;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT partition_heap_test_t1.*, partition_heap_test_t2.B FROM partition_heap_test_t1 INNER JOIN partition_heap_test_t2 ON (partition_heap_test_t1.A = partition_heap_test_t2.A) ORDER BY 1,2,3;
|
||||
EXPLAIN (COSTS OFF) SELECT partition_heap_test_t1.*, partition_heap_test_t2.B FROM partition_heap_test_t1 INNER JOIN partition_heap_test_t2 ON (partition_heap_test_t1.A = partition_heap_test_t2.A) ORDER BY 1,2,3;
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -568,7 +568,7 @@ SET ENABLE_MATERIAL = ON;
|
||||
SET ENABLE_MERGEJOIN = ON;
|
||||
SET ENABLE_NESTLOOP = OFF;
|
||||
SET ENABLE_HASHJOIN = OFF;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT partition_heap_test_t1.*, partition_heap_test_t2.B FROM partition_heap_test_t1 INNER JOIN partition_heap_test_t2 ON (partition_heap_test_t1.A = partition_heap_test_t2.A) ORDER BY 1,2,3;
|
||||
EXPLAIN (COSTS OFF) SELECT partition_heap_test_t1.*, partition_heap_test_t2.B FROM partition_heap_test_t1 INNER JOIN partition_heap_test_t2 ON (partition_heap_test_t1.A = partition_heap_test_t2.A) ORDER BY 1,2,3;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
|
||||
@ -300,9 +300,8 @@ where heap_tbl_a.c2 = heap_tbl_b.c2;
|
||||
Nested Loop
|
||||
Join Filter: (heap_tbl_a.c2 = heap_tbl_b.c2)
|
||||
-> Seq Scan on heap_tbl_a
|
||||
-> Materialize
|
||||
-> Seq Scan on heap_tbl_b
|
||||
(5 rows)
|
||||
-> Seq Scan on heap_tbl_b
|
||||
(4 rows)
|
||||
|
||||
select ac1, sum(bc2) from (
|
||||
select /*+ nestloop(heap_tbl_a heap_tbl_b) */ heap_tbl_a.c1 ac1, heap_tbl_b.c2 bc2
|
||||
@ -337,17 +336,16 @@ explain (costs off)
|
||||
select /*+ nestloop(heap_tbl_a heap_tbl_c) */ heap_tbl_a.c1 ac1, heap_tbl_c.c2 bc2
|
||||
from heap_tbl_a, heap_tbl_c
|
||||
where heap_tbl_a.c2 = heap_tbl_c.c2;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------
|
||||
QUERY PLAN
|
||||
------------------------------------------------
|
||||
Nested Loop
|
||||
Join Filter: (heap_tbl_a.c2 = heap_tbl_c.c2)
|
||||
-> Partition Iterator
|
||||
Iterations: 4
|
||||
-> Partitioned Seq Scan on heap_tbl_c
|
||||
Selected Partitions: 1..4
|
||||
-> Seq Scan on heap_tbl_a
|
||||
-> Materialize
|
||||
-> Partition Iterator
|
||||
Iterations: 4
|
||||
-> Partitioned Seq Scan on heap_tbl_c
|
||||
Selected Partitions: 1..4
|
||||
(8 rows)
|
||||
(7 rows)
|
||||
|
||||
select ac1, sum(bc2) from (
|
||||
select /*+ nestloop(heap_tbl_a heap_tbl_c) */ heap_tbl_a.c1 ac1, heap_tbl_c.c2 bc2
|
||||
@ -383,21 +381,20 @@ explain (costs off)
|
||||
select /*+ nestloop(heap_tbl_a heap_tbl_c) */ heap_tbl_a.c1 ac1, heap_tbl_c.c2 bc2
|
||||
from heap_tbl_a, heap_tbl_b, heap_tbl_c
|
||||
where heap_tbl_a.c2 = heap_tbl_c.c2 and heap_tbl_c.c2 = heap_tbl_b.c2;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
------------------------------------------------------
|
||||
Hash Join
|
||||
Hash Cond: (heap_tbl_a.c2 = heap_tbl_b.c2)
|
||||
-> Nested Loop
|
||||
Join Filter: (heap_tbl_a.c2 = heap_tbl_c.c2)
|
||||
-> Partition Iterator
|
||||
Iterations: 4
|
||||
-> Partitioned Seq Scan on heap_tbl_c
|
||||
Selected Partitions: 1..4
|
||||
-> Seq Scan on heap_tbl_a
|
||||
-> Materialize
|
||||
-> Partition Iterator
|
||||
Iterations: 4
|
||||
-> Partitioned Seq Scan on heap_tbl_c
|
||||
Selected Partitions: 1..4
|
||||
-> Hash
|
||||
-> Seq Scan on heap_tbl_b
|
||||
(12 rows)
|
||||
(11 rows)
|
||||
|
||||
select ac1, sum(bc2) from (
|
||||
select /*+ nestloop(heap_tbl_a heap_tbl_c) */ heap_tbl_a.c1 ac1, heap_tbl_c.c2 bc2
|
||||
|
||||
@ -124,13 +124,13 @@ explain (verbose on, costs off)
|
||||
select count(*) from heap_tablesample_row_part tablesample system (50) repeatable (500);
|
||||
count
|
||||
-------
|
||||
500
|
||||
0
|
||||
(1 row)
|
||||
|
||||
select count(*) from heap_tablesample_row_part tablesample system (50) repeatable (1);
|
||||
count
|
||||
-------
|
||||
501
|
||||
0
|
||||
(1 row)
|
||||
|
||||
-- 100% should give repeatable count results (ie, all rows) in any case
|
||||
@ -155,13 +155,13 @@ select count(*) from heap_tablesample_row_part tablesample system (100) repeatab
|
||||
select count(*) from heap_tablesample_row_part tablesample bernoulli (50) repeatable (200);
|
||||
count
|
||||
-------
|
||||
529
|
||||
570
|
||||
(1 row)
|
||||
|
||||
select count(*) from heap_tablesample_row_part tablesample bernoulli (5.5) repeatable (-1);
|
||||
count
|
||||
-------
|
||||
60
|
||||
110
|
||||
(1 row)
|
||||
|
||||
-- 100% should give repeatable count results (ie, all rows) in any case
|
||||
|
||||
@ -60,7 +60,7 @@ SET enable_nestloop = ON;
|
||||
SET enable_mergejoin = OFF;
|
||||
SET enable_hashjoin = OFF;
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -75,7 +75,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(9 rows)
|
||||
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -96,7 +96,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(15 rows)
|
||||
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -117,7 +117,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(15 rows)
|
||||
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -138,7 +138,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(15 rows)
|
||||
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -157,7 +157,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------
|
||||
Nested Loop Left Join
|
||||
@ -179,7 +179,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: 1..4
|
||||
(17 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -201,7 +201,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(17 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -315,7 +315,7 @@ SET enable_nestloop = ON;
|
||||
SET enable_mergejoin = OFF;
|
||||
SET enable_hashjoin = OFF;
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -330,7 +330,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(9 rows)
|
||||
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -348,7 +348,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(12 rows)
|
||||
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -366,7 +366,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(12 rows)
|
||||
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -384,7 +384,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(12 rows)
|
||||
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -403,7 +403,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------
|
||||
Nested Loop Left Join
|
||||
@ -419,7 +419,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: 1..4
|
||||
(11 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -435,7 +435,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(11 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -543,7 +543,7 @@ SET enable_nestloop = OFF;
|
||||
SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = OFF;
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -558,7 +558,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(9 rows)
|
||||
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -580,7 +580,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(16 rows)
|
||||
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -602,7 +602,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(16 rows)
|
||||
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -624,7 +624,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(16 rows)
|
||||
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -646,7 +646,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(16 rows)
|
||||
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------
|
||||
Merge Left Join
|
||||
@ -666,7 +666,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: 1..4
|
||||
(15 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -687,7 +687,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(16 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -802,7 +802,7 @@ SET enable_hashjoin = OFF;
|
||||
--
|
||||
---- explain cross join
|
||||
--
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -817,7 +817,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(9 rows)
|
||||
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -836,7 +836,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -855,7 +855,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -874,7 +874,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -893,7 +893,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Right Join
|
||||
@ -910,7 +910,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(12 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -928,7 +928,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(13 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -1038,7 +1038,7 @@ SET enable_nestloop = OFF;
|
||||
SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = OFF;
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -1053,7 +1053,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(9 rows)
|
||||
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -1072,7 +1072,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -1091,7 +1091,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -1110,7 +1110,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -1129,7 +1129,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Left Join
|
||||
@ -1146,7 +1146,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: 1..4
|
||||
(12 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -1164,7 +1164,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(13 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -1274,7 +1274,7 @@ SET enable_nestloop = OFF;
|
||||
SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = OFF;
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -1289,7 +1289,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(9 rows)
|
||||
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -1310,7 +1310,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(15 rows)
|
||||
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -1331,7 +1331,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(15 rows)
|
||||
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -1352,7 +1352,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(15 rows)
|
||||
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -1371,7 +1371,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------
|
||||
Nested Loop Left Join
|
||||
@ -1393,7 +1393,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: 1..4
|
||||
(17 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -1420,7 +1420,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(22 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -1539,7 +1539,7 @@ SET enable_nestloop = OFF;
|
||||
SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = OFF;
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -1554,7 +1554,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(9 rows)
|
||||
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -1573,7 +1573,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -1592,7 +1592,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -1611,7 +1611,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -1630,7 +1630,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Left Join
|
||||
@ -1647,7 +1647,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: 1..4
|
||||
(12 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -1665,7 +1665,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(13 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -1775,7 +1775,7 @@ SET enable_nestloop = ON;
|
||||
SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = ON;
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -1790,7 +1790,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(9 rows)
|
||||
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -1809,7 +1809,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -1828,7 +1828,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -1847,7 +1847,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -1866,7 +1866,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------
|
||||
Hash Right Join
|
||||
@ -1883,7 +1883,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(12 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------
|
||||
Hash Join
|
||||
@ -1901,7 +1901,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(13 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------
|
||||
Hash Join
|
||||
@ -2013,7 +2013,7 @@ SET enable_hashjoin = ON;
|
||||
--
|
||||
---- explain cross join
|
||||
--
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -2028,7 +2028,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(9 rows)
|
||||
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -2047,7 +2047,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -2066,7 +2066,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -2085,7 +2085,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -2104,7 +2104,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Right Join
|
||||
@ -2121,7 +2121,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(12 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -2139,7 +2139,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(13 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -2220,7 +2220,7 @@ SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_sca
|
||||
(4 rows)
|
||||
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Right Join
|
||||
@ -2237,7 +2237,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(12 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -2255,7 +2255,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(13 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -2303,7 +2303,7 @@ SET enable_nestloop = ON;
|
||||
SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = ON;
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -2318,7 +2318,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(9 rows)
|
||||
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -2337,7 +2337,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -2356,7 +2356,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -2375,7 +2375,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -2394,7 +2394,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Left Join
|
||||
@ -2411,7 +2411,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: 1..4
|
||||
(12 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -2429,7 +2429,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(13 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -2510,7 +2510,7 @@ SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_sca
|
||||
(4 rows)
|
||||
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Left Join
|
||||
@ -2527,7 +2527,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: 1..4
|
||||
(12 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -2545,7 +2545,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(13 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -2593,7 +2593,7 @@ SET enable_nestloop = ON;
|
||||
SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = ON;
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -2608,7 +2608,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(9 rows)
|
||||
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -2629,7 +2629,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(15 rows)
|
||||
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -2650,7 +2650,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(15 rows)
|
||||
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -2671,7 +2671,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(15 rows)
|
||||
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -2690,7 +2690,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------
|
||||
Nested Loop Left Join
|
||||
@ -2712,7 +2712,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: 1..4
|
||||
(17 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
Hash Join
|
||||
@ -2736,7 +2736,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(19 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
Hash Join
|
||||
@ -2823,7 +2823,7 @@ SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_sca
|
||||
(4 rows)
|
||||
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------
|
||||
Nested Loop Left Join
|
||||
@ -2845,7 +2845,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: 1..4
|
||||
(17 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
Hash Join
|
||||
@ -2869,7 +2869,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(19 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
Hash Join
|
||||
@ -2923,7 +2923,7 @@ SET enable_nestloop = ON;
|
||||
SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = ON;
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -2938,7 +2938,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(9 rows)
|
||||
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -2957,7 +2957,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -2976,7 +2976,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -2995,7 +2995,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -3014,7 +3014,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Left Join
|
||||
@ -3031,7 +3031,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: 1..4
|
||||
(12 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -3049,7 +3049,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(13 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
Merge Join
|
||||
@ -3159,7 +3159,7 @@ SET enable_nestloop = ON;
|
||||
SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = ON;
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Nested Loop
|
||||
@ -3174,7 +3174,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(9 rows)
|
||||
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -3193,7 +3193,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -3212,7 +3212,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -3231,7 +3231,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------
|
||||
Sort
|
||||
@ -3250,7 +3250,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
(13 rows)
|
||||
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------
|
||||
Hash Right Join
|
||||
@ -3267,7 +3267,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(12 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------
|
||||
Hash Join
|
||||
@ -3285,7 +3285,7 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_
|
||||
Selected Partitions: NONE
|
||||
(13 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------
|
||||
Hash Join
|
||||
|
||||
@ -6,8 +6,8 @@ set current_schema = col_distribute_subplan_base;
|
||||
-- Create Table and Insert Data
|
||||
create table t_subplan1(a1 int, b1 int, c1 int, d1 int) with (orientation = column) ;
|
||||
create table t_subplan2(a2 int, b2 int, c2 int, d2 int) with (orientation = column) ;
|
||||
insert into t_subplan1 select generate_series(1, 100)%98, generate_series(1, 100)%20, generate_series(1, 100)%13, generate_series(1, 100)%6 from public.src;
|
||||
insert into t_subplan2 select generate_series(1, 50)%48, generate_series(1, 50)%28, generate_series(1, 50)%12, generate_series(1, 50)%9 from public.src;
|
||||
insert into t_subplan1 select generate_series(1, 100)%98, generate_series(1, 100)%20, generate_series(1, 100)%13, generate_series(1, 100)%6;
|
||||
insert into t_subplan2 select generate_series(1, 50)%48, generate_series(1, 50)%28, generate_series(1, 50)%12, generate_series(1, 50)%9;
|
||||
-- 1. initplan
|
||||
explain (costs off)
|
||||
select case when (select count(*)
|
||||
@ -269,8 +269,8 @@ from t ctr2
|
||||
where ctr1.d2 = ctr2.d2)
|
||||
order by 1
|
||||
limit 10;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------
|
||||
Limit
|
||||
CTE t
|
||||
-> Row Adapter
|
||||
@ -283,14 +283,15 @@ limit 10;
|
||||
-> Sort
|
||||
Sort Key: ctr1.total
|
||||
-> Hash Join
|
||||
Hash Cond: (ctr1.d2 = ctr2.d2)
|
||||
Join Filter: ((ctr1.total)::numeric > ((avg(ctr2.total) * 1.2)))
|
||||
Hash Cond: (ctr1.d2 = subquery."?column?")
|
||||
Join Filter: ((ctr1.total)::numeric > (subquery."?column?" * 1.2))
|
||||
-> CTE Scan on t ctr1
|
||||
-> Hash
|
||||
-> HashAggregate
|
||||
Group By Key: ctr2.d2
|
||||
-> CTE Scan on t ctr2
|
||||
(19 rows)
|
||||
-> Subquery Scan on subquery
|
||||
-> HashAggregate
|
||||
Group By Key: ctr2.d2
|
||||
-> CTE Scan on t ctr2
|
||||
(20 rows)
|
||||
|
||||
with t as
|
||||
(select d1
|
||||
@ -341,8 +342,8 @@ from t ctr3
|
||||
where ctr2.d2=ctr3.d2))
|
||||
order by 1
|
||||
limit 10;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------------------------
|
||||
Limit
|
||||
CTE t
|
||||
-> Row Adapter
|
||||
@ -359,15 +360,16 @@ limit 10;
|
||||
SubPlan 2
|
||||
-> Aggregate
|
||||
-> Nested Loop
|
||||
Join Filter: (((ctr1.d2 + ctr2.d2))::numeric < ((avg(ctr3.total) * 3::numeric)))
|
||||
Join Filter: (((ctr1.d2 + ctr2.d2))::numeric < (subquery."?column?" * 3::numeric))
|
||||
-> CTE Scan on t ctr2
|
||||
Filter: (d2 = ctr1.d2)
|
||||
-> Materialize
|
||||
-> GroupAggregate
|
||||
Group By Key: ctr3.d2
|
||||
-> CTE Scan on t ctr3
|
||||
Filter: (d2 = ctr1.d2)
|
||||
(24 rows)
|
||||
-> Subquery Scan on subquery
|
||||
-> GroupAggregate
|
||||
Group By Key: ctr3.d2
|
||||
-> CTE Scan on t ctr3
|
||||
Filter: (d2 = ctr1.d2)
|
||||
(25 rows)
|
||||
|
||||
with t as
|
||||
(select d1
|
||||
@ -610,15 +612,16 @@ select a1, count(*) cnt
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (col_distribute_subplan_base.t_subplan1.a1 = t_subplan2.a2)
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (col_distribute_subplan_base.t_subplan1.c1 = t2.c2)
|
||||
Join Filter: ((col_distribute_subplan_base.t_subplan1.b1)::numeric > (1.2 * (avg(t2.b2))))
|
||||
Hash Cond: (col_distribute_subplan_base.t_subplan1.c1 = subquery."?column?")
|
||||
Join Filter: ((col_distribute_subplan_base.t_subplan1.b1)::numeric > (1.2 * subquery.avg))
|
||||
-> CStore Scan on t_subplan1
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: t2.c2
|
||||
-> CStore Scan on t_subplan2 t2
|
||||
-> Vector Subquery Scan on subquery
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: t2.c2
|
||||
-> CStore Scan on t_subplan2 t2
|
||||
-> CStore Scan on t_subplan2
|
||||
Filter: ((c2)::numeric > $0)
|
||||
(22 rows)
|
||||
(23 rows)
|
||||
|
||||
|
||||
select a1, count(*) cnt
|
||||
@ -755,18 +758,19 @@ select a1, count(*) cnt
|
||||
-> CStore Scan on t_subplan2
|
||||
Filter: ((c2)::numeric > $0)
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (col_distribute_subplan_base.t_subplan1.c1 = t2.c2)
|
||||
Join Filter: ((col_distribute_subplan_base.t_subplan1.b1)::numeric > (1.2 * (avg(t2.b2))))
|
||||
Hash Cond: (col_distribute_subplan_base.t_subplan1.c1 = subquery."?column?")
|
||||
Join Filter: ((col_distribute_subplan_base.t_subplan1.b1)::numeric > (1.2 * subquery.avg))
|
||||
-> CStore Scan on t_subplan1
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: t2.c2
|
||||
InitPlan 2 (returns $1)
|
||||
-> Row Adapter
|
||||
-> Vector Aggregate
|
||||
-> CStore Scan on t_subplan1 (min-max optimization)
|
||||
-> CStore Scan on t_subplan2 t2
|
||||
Filter: (d2 > $1)
|
||||
(27 rows)
|
||||
-> Vector Subquery Scan on subquery
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: t2.c2
|
||||
InitPlan 2 (returns $1)
|
||||
-> Row Adapter
|
||||
-> Vector Aggregate
|
||||
-> CStore Scan on t_subplan1 (min-max optimization)
|
||||
-> CStore Scan on t_subplan2 t2
|
||||
Filter: (d2 > $1)
|
||||
(28 rows)
|
||||
|
||||
select a1, count(*) cnt
|
||||
from t_subplan1
|
||||
@ -818,12 +822,13 @@ select a1, count(*) cnt
|
||||
-> Row Adapter
|
||||
-> Vector Aggregate
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (t1.d1 = t2.d2)
|
||||
Join Filter: ((t1.a1)::numeric > (avg(t2.a2)))
|
||||
Hash Cond: (t1.d1 = subquery."?column?")
|
||||
Join Filter: ((t1.a1)::numeric > subquery.avg)
|
||||
-> CStore Scan on t_subplan1 t1
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: t2.d2
|
||||
-> CStore Scan on t_subplan2 t2
|
||||
-> Vector Subquery Scan on subquery
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: t2.d2
|
||||
-> CStore Scan on t_subplan2 t2
|
||||
-> Vector Sort
|
||||
Sort Key: t_subplan1.a1, (count(*))
|
||||
-> Vector Sonic Hash Aggregate
|
||||
@ -833,7 +838,7 @@ select a1, count(*) cnt
|
||||
-> CStore Scan on t_subplan1
|
||||
-> CStore Scan on t_subplan2
|
||||
Filter: ((c2)::numeric > $0)
|
||||
(21 rows)
|
||||
(22 rows)
|
||||
|
||||
select a1, count(*) cnt
|
||||
from t_subplan1
|
||||
|
||||
@ -6,8 +6,8 @@ set current_schema = col_distribute_subplan_base_2;
|
||||
-- Create Table and Insert Data
|
||||
create table t_subplan1(a1 int, b1 int, c1 int, d1 int) with (orientation = column) ;
|
||||
create table t_subplan2(a2 int, b2 int, c2 int, d2 int) with (orientation = column) ;
|
||||
insert into t_subplan1 select generate_series(1, 100)%98, generate_series(1, 100)%20, generate_series(1, 100)%13, generate_series(1, 100)%6 from public.src;
|
||||
insert into t_subplan2 select generate_series(1, 50)%48, generate_series(1, 50)%28, generate_series(1, 50)%12, generate_series(1, 50)%9 from public.src;
|
||||
insert into t_subplan1 select generate_series(1, 100)%98, generate_series(1, 100)%20, generate_series(1, 100)%13, generate_series(1, 100)%6;
|
||||
insert into t_subplan2 select generate_series(1, 50)%48, generate_series(1, 50)%28, generate_series(1, 50)%12, generate_series(1, 50)%9;
|
||||
create table t_subplan5 with (orientation = column) as select * from t_subplan1;
|
||||
create table t_subplan6 with (orientation = column) as select * from t_subplan2;
|
||||
--create row table
|
||||
@ -87,7 +87,7 @@ group by c1, d1 order by c1+1 desc, 2 desc limit 5;
|
||||
Output: t_subplan1.c1, t_subplan1.d1, ((t_subplan1.c1 + 1))
|
||||
-> Vector Limit
|
||||
Output: t_subplan1.c1, t_subplan1.d1, ((t_subplan1.c1 + 1))
|
||||
InitPlan 1 (returns $1)
|
||||
InitPlan 1 (returns $2)
|
||||
-> Row Adapter
|
||||
Output: ('Dummy')
|
||||
-> Vector Partition Iterator
|
||||
@ -105,7 +105,7 @@ group by c1, d1 order by c1+1 desc, 2 desc limit 5;
|
||||
Group By Key: t_subplan1.c1, t_subplan1.d1
|
||||
-> Vector Result
|
||||
Output: t_subplan1.c1, t_subplan1.d1
|
||||
One-Time Filter: $1
|
||||
One-Time Filter: $2
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: t_subplan1.c1, t_subplan1.d1
|
||||
(25 rows)
|
||||
@ -129,8 +129,8 @@ select * from t_subplan2 where
|
||||
exists (select * from t_subplan1 where d1<9 and d1 >1 order by d1 limit 7) order by c1,b1 limit 10))
|
||||
and exists( select max(a1),count(b1),c2 from t_subplan1 group by c2 having c2>2 or c2 is null)
|
||||
order by a2, b2, c2, d2 limit 10;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: t_subplan2.a2, t_subplan2.b2, t_subplan2.c2, t_subplan2.d2
|
||||
-> Vector Limit
|
||||
@ -143,29 +143,19 @@ order by a2, b2, c2, d2 limit 10;
|
||||
One-Time Filter: $1
|
||||
InitPlan 2 (returns $1)
|
||||
-> Row Adapter
|
||||
Output: col_distribute_subplan_base_2.t_subplan1.b1, col_distribute_subplan_base_2.t_subplan1.c1
|
||||
-> Vector Limit
|
||||
Output: col_distribute_subplan_base_2.t_subplan1.b1, col_distribute_subplan_base_2.t_subplan1.c1
|
||||
Output: ('Dummy')
|
||||
-> Vector Result
|
||||
Output: ('Dummy')
|
||||
One-Time Filter: $0
|
||||
InitPlan 1 (returns $0)
|
||||
-> Row Adapter
|
||||
Output: col_distribute_subplan_base_2.t_subplan1.a1, col_distribute_subplan_base_2.t_subplan1.b1, col_distribute_subplan_base_2.t_subplan1.c1, col_distribute_subplan_base_2.t_subplan1.d1
|
||||
-> Vector Limit
|
||||
Output: col_distribute_subplan_base_2.t_subplan1.a1, col_distribute_subplan_base_2.t_subplan1.b1, col_distribute_subplan_base_2.t_subplan1.c1, col_distribute_subplan_base_2.t_subplan1.d1
|
||||
-> Vector Sort
|
||||
Output: col_distribute_subplan_base_2.t_subplan1.a1, col_distribute_subplan_base_2.t_subplan1.b1, col_distribute_subplan_base_2.t_subplan1.c1, col_distribute_subplan_base_2.t_subplan1.d1
|
||||
Sort Key: col_distribute_subplan_base_2.t_subplan1.d1
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: col_distribute_subplan_base_2.t_subplan1.a1, col_distribute_subplan_base_2.t_subplan1.b1, col_distribute_subplan_base_2.t_subplan1.c1, col_distribute_subplan_base_2.t_subplan1.d1
|
||||
Filter: ((col_distribute_subplan_base_2.t_subplan1.d1 < 9) AND (col_distribute_subplan_base_2.t_subplan1.d1 > 1))
|
||||
-> Vector Sort
|
||||
Output: col_distribute_subplan_base_2.t_subplan1.b1, col_distribute_subplan_base_2.t_subplan1.c1
|
||||
Sort Key: col_distribute_subplan_base_2.t_subplan1.c1, col_distribute_subplan_base_2.t_subplan1.b1
|
||||
-> Vector Result
|
||||
Output: col_distribute_subplan_base_2.t_subplan1.b1, col_distribute_subplan_base_2.t_subplan1.c1
|
||||
One-Time Filter: $0
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: col_distribute_subplan_base_2.t_subplan1.b1, col_distribute_subplan_base_2.t_subplan1.c1
|
||||
Filter: (col_distribute_subplan_base_2.t_subplan1.c1 < 20)
|
||||
Output: ('Dummy')
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: 'Dummy'
|
||||
Filter: ((col_distribute_subplan_base_2.t_subplan1.d1 < 9) AND (col_distribute_subplan_base_2.t_subplan1.d1 > 1))
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: 'Dummy'
|
||||
Filter: (col_distribute_subplan_base_2.t_subplan1.c1 < 20)
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: 'Dummy'
|
||||
Filter: (col_distribute_subplan_base_2.t_subplan1.d1 < 8)
|
||||
@ -189,7 +179,7 @@ order by a2, b2, c2, d2 limit 10;
|
||||
One-Time Filter: ((t_subplan2.c2 > 2) OR (t_subplan2.c2 IS NULL))
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: col_distribute_subplan_base_2.t_subplan1.a1, col_distribute_subplan_base_2.t_subplan1.b1
|
||||
(58 rows)
|
||||
(48 rows)
|
||||
|
||||
select * from t_subplan2 where
|
||||
exists (select d1 from t_subplan1 where d1<8 and
|
||||
@ -969,21 +959,18 @@ select (with cte(foo) as (select a1) select foo from cte) from t_subplan1 order
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: ((SubPlan 2))
|
||||
Output: ((SubPlan 1))
|
||||
-> Vector Limit
|
||||
Output: ((SubPlan 2))
|
||||
Output: ((SubPlan 1))
|
||||
-> Vector Sort
|
||||
Output: ((SubPlan 2))
|
||||
Sort Key: ((SubPlan 2))
|
||||
Output: ((SubPlan 1))
|
||||
Sort Key: ((SubPlan 1))
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: (SubPlan 2)
|
||||
SubPlan 2
|
||||
-> CTE Scan on cte
|
||||
Output: cte.foo
|
||||
CTE cte
|
||||
-> Result
|
||||
Output: t_subplan1.a1
|
||||
(15 rows)
|
||||
Output: (SubPlan 1)
|
||||
SubPlan 1
|
||||
-> Result
|
||||
Output: t_subplan1.a1
|
||||
(12 rows)
|
||||
|
||||
select (with cte(foo) as (select a1) select foo from cte) from t_subplan1 order by 1 limit 3;
|
||||
foo
|
||||
@ -993,37 +980,6 @@ select (with cte(foo) as (select a1) select foo from cte) from t_subplan1 order
|
||||
1
|
||||
(3 rows)
|
||||
|
||||
explain (costs off, verbose on)
|
||||
select (with cte(foo) as (select a1 from dual) select foo from cte) from t_subplan1 order by 1 limit 3;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: ((SubPlan 2))
|
||||
-> Vector Limit
|
||||
Output: ((SubPlan 2))
|
||||
-> Vector Sort
|
||||
Output: ((SubPlan 2))
|
||||
Sort Key: ((SubPlan 2))
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: (SubPlan 2)
|
||||
SubPlan 2
|
||||
-> CTE Scan on cte
|
||||
Output: cte.foo
|
||||
CTE cte
|
||||
-> Subquery Scan on dual
|
||||
Output: t_subplan1.a1
|
||||
-> Result
|
||||
Output: 'X'::text
|
||||
(17 rows)
|
||||
|
||||
select (with cte(foo) as (select a1 from dual) select foo from cte) from t_subplan1 order by 1 limit 3;
|
||||
foo
|
||||
-----
|
||||
0
|
||||
1
|
||||
1
|
||||
(3 rows)
|
||||
|
||||
explain (costs off, verbose on)
|
||||
select (with cte(foo) as (values(b1)) values((select foo from cte))) from t_subplan1 order by 1 limit 3;
|
||||
QUERY PLAN
|
||||
@ -1058,25 +1014,22 @@ select (with cte(foo) as (values(b1)) values((select foo from cte))) from t_subp
|
||||
|
||||
explain (costs off, verbose on)
|
||||
select (with cte(foo) as (select avg(a1) from t_subplan1) select foo from cte) from t_subplan1 order by 1 limit 3;
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: ($1)
|
||||
Output: ($0)
|
||||
-> Vector Limit
|
||||
Output: ($1)
|
||||
InitPlan 2 (returns $1)
|
||||
-> CTE Scan on cte
|
||||
Output: cte.foo
|
||||
CTE cte
|
||||
-> Row Adapter
|
||||
Output: (avg(col_distribute_subplan_base_2.t_subplan1.a1))
|
||||
-> Vector Aggregate
|
||||
Output: avg(col_distribute_subplan_base_2.t_subplan1.a1)
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: col_distribute_subplan_base_2.t_subplan1.a1
|
||||
Output: ($0)
|
||||
InitPlan 1 (returns $0)
|
||||
-> Row Adapter
|
||||
Output: (avg(col_distribute_subplan_base_2.t_subplan1.a1))
|
||||
-> Vector Aggregate
|
||||
Output: avg(col_distribute_subplan_base_2.t_subplan1.a1)
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: col_distribute_subplan_base_2.t_subplan1.a1
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: $1
|
||||
(16 rows)
|
||||
Output: $0
|
||||
(13 rows)
|
||||
|
||||
select (with cte(foo) as (select avg(a1) from t_subplan1) select foo from cte) from t_subplan1 order by 1 limit 3;
|
||||
foo
|
||||
@ -1088,28 +1041,25 @@ select (with cte(foo) as (select avg(a1) from t_subplan1) select foo from cte) f
|
||||
|
||||
explain (costs off, verbose on)
|
||||
select (with cte(foo) as (select t_subplan1.b1 from t_subplan2 limit 1) select foo from cte) from t_subplan1 order by 1 limit 3;
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: ((SubPlan 2))
|
||||
Output: ((SubPlan 1))
|
||||
-> Vector Limit
|
||||
Output: ((SubPlan 2))
|
||||
Output: ((SubPlan 1))
|
||||
-> Vector Sort
|
||||
Output: ((SubPlan 2))
|
||||
Sort Key: ((SubPlan 2))
|
||||
Output: ((SubPlan 1))
|
||||
Sort Key: ((SubPlan 1))
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: (SubPlan 2)
|
||||
SubPlan 2
|
||||
-> CTE Scan on cte
|
||||
Output: cte.foo
|
||||
CTE cte
|
||||
-> Row Adapter
|
||||
Output: (t_subplan1.b1)
|
||||
-> Vector Limit
|
||||
Output: (t_subplan1.b1)
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan2
|
||||
Output: t_subplan1.b1
|
||||
(19 rows)
|
||||
Output: (SubPlan 1)
|
||||
SubPlan 1
|
||||
-> Row Adapter
|
||||
Output: ($0)
|
||||
-> Vector Limit
|
||||
Output: (t_subplan1.b1)
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan2
|
||||
Output: t_subplan1.b1
|
||||
(16 rows)
|
||||
|
||||
select (with cte(foo) as (select t_subplan1.b1 from t_subplan2 limit 1) select foo from cte) from t_subplan1 order by 1 limit 3;
|
||||
foo
|
||||
@ -1121,28 +1071,27 @@ select (with cte(foo) as (select t_subplan1.b1 from t_subplan2 limit 1) select f
|
||||
|
||||
explain (costs off, verbose on)
|
||||
select (with cte(foo) as (select t_subplan1.b1 from t_subplan2 limit 1) select foo+t_subplan1.c1 from cte) from t_subplan1 order by 1 limit 3;
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: ((SubPlan 2))
|
||||
Output: ((SubPlan 1))
|
||||
-> Vector Limit
|
||||
Output: ((SubPlan 2))
|
||||
Output: ((SubPlan 1))
|
||||
-> Vector Sort
|
||||
Output: ((SubPlan 2))
|
||||
Sort Key: ((SubPlan 2))
|
||||
Output: ((SubPlan 1))
|
||||
Sort Key: ((SubPlan 1))
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: (SubPlan 2)
|
||||
SubPlan 2
|
||||
-> CTE Scan on cte
|
||||
Output: (cte.foo + t_subplan1.c1)
|
||||
CTE cte
|
||||
-> Row Adapter
|
||||
Output: (t_subplan1.b1)
|
||||
-> Vector Limit
|
||||
Output: (t_subplan1.b1)
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan2
|
||||
Output: t_subplan1.b1
|
||||
(19 rows)
|
||||
Output: (SubPlan 1)
|
||||
SubPlan 1
|
||||
-> Row Adapter
|
||||
Output: ((cte.foo + $0))
|
||||
-> Vector Subquery Scan on cte
|
||||
Output: (cte.foo + t_subplan1.c1)
|
||||
-> Vector Limit
|
||||
Output: (t_subplan1.b1)
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan2
|
||||
Output: t_subplan1.b1
|
||||
(18 rows)
|
||||
|
||||
select (with cte(foo) as (select t_subplan1.b1 from t_subplan2 limit 1) select foo+t_subplan1.c1 from cte) from t_subplan1 order by 1 limit 3;
|
||||
?column?
|
||||
@ -1193,21 +1142,18 @@ select (with cte(foo) as (values(b1)) select foo from cte) from t_subplan1 order
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: ((SubPlan 2))
|
||||
Output: ((SubPlan 1))
|
||||
-> Vector Limit
|
||||
Output: ((SubPlan 2))
|
||||
Output: ((SubPlan 1))
|
||||
-> Vector Sort
|
||||
Output: ((SubPlan 2))
|
||||
Sort Key: ((SubPlan 2))
|
||||
Output: ((SubPlan 1))
|
||||
Sort Key: ((SubPlan 1))
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: (SubPlan 2)
|
||||
SubPlan 2
|
||||
-> CTE Scan on cte
|
||||
Output: cte.foo
|
||||
CTE cte
|
||||
-> Values Scan on "*VALUES*"
|
||||
Output: "*VALUES*".column1
|
||||
(15 rows)
|
||||
Output: (SubPlan 1)
|
||||
SubPlan 1
|
||||
-> Values Scan on "*VALUES*"
|
||||
Output: "*VALUES*".column1
|
||||
(12 rows)
|
||||
|
||||
select (with cte(foo) as (values(b1)) select foo from cte) from t_subplan1 order by 1 limit 3;
|
||||
foo
|
||||
@ -1352,8 +1298,8 @@ select * from t_subplan1 where c1 = (with tmp as (select d2 from t_subplan2 wher
|
||||
Sort Key: t_subplan1.a1, t_subplan1.b1, t_subplan1.c1, t_subplan1.d1
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: t_subplan1.a1, t_subplan1.b1, t_subplan1.c1, t_subplan1.d1
|
||||
Filter: (t_subplan1.c1 = (SubPlan 3))
|
||||
SubPlan 3
|
||||
Filter: (t_subplan1.c1 = (SubPlan 2))
|
||||
SubPlan 2
|
||||
-> Aggregate
|
||||
Output: count(*)
|
||||
CTE tmp
|
||||
@ -1364,16 +1310,22 @@ select * from t_subplan1 where c1 = (with tmp as (select d2 from t_subplan2 wher
|
||||
Filter: (t_subplan2.b2 = t_subplan1.a1)
|
||||
-> Aggregate
|
||||
Output: 'abc'::text, count(tmp1.d2)
|
||||
-> CTE Scan on tmp tmp1
|
||||
-> Hash Left Join
|
||||
Output: tmp1.d2
|
||||
Filter: (tmp1.d2 > (SubPlan 2))
|
||||
SubPlan 2
|
||||
-> Aggregate
|
||||
Output: count(*)
|
||||
-> CTE Scan on tmp tmp2
|
||||
Output: tmp2.d2
|
||||
Filter: (tmp2.d2 = tmp1.d2)
|
||||
(28 rows)
|
||||
Hash Cond: (tmp1.d2 = subquery."?column?")
|
||||
Filter: (tmp1.d2 > COALESCE(subquery.count, 0))
|
||||
-> CTE Scan on tmp tmp1
|
||||
Output: tmp1.d2
|
||||
-> Hash
|
||||
Output: subquery."?column?", subquery.count
|
||||
-> Subquery Scan on subquery
|
||||
Output: subquery."?column?", subquery.count
|
||||
-> HashAggregate
|
||||
Output: count(*), tmp2.d2
|
||||
Group By Key: tmp2.d2
|
||||
-> CTE Scan on tmp tmp2
|
||||
Output: tmp2.d2
|
||||
(34 rows)
|
||||
|
||||
select * from t_subplan1 where c1 = (with tmp as (select d2 from t_subplan2 where b2=a1)
|
||||
select count(*) from (select 'abc', count(d2) from tmp tmp1
|
||||
@ -1405,8 +1357,8 @@ select * from t_subplan1 where c1 = (with tmp as (select d2 from t_subplan2 wher
|
||||
Sort Key: t_subplan1.a1, t_subplan1.b1, t_subplan1.c1, t_subplan1.d1
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: t_subplan1.a1, t_subplan1.b1, t_subplan1.c1, t_subplan1.d1
|
||||
Filter: (t_subplan1.c1 = (SubPlan 3))
|
||||
SubPlan 3
|
||||
Filter: (t_subplan1.c1 = (SubPlan 2))
|
||||
SubPlan 2
|
||||
-> Aggregate
|
||||
Output: count(*)
|
||||
CTE tmp
|
||||
@ -1415,16 +1367,21 @@ select * from t_subplan1 where c1 = (with tmp as (select d2 from t_subplan2 wher
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan2
|
||||
Output: t_subplan2.d2
|
||||
Filter: (t_subplan2.b2 = t_subplan1.a1)
|
||||
-> CTE Scan on tmp tmp1
|
||||
Output: tmp1.d2
|
||||
Filter: (tmp1.d2 > (SubPlan 2))
|
||||
SubPlan 2
|
||||
-> Aggregate
|
||||
Output: count(*)
|
||||
-> CTE Scan on tmp tmp2
|
||||
Output: tmp2.d2
|
||||
Filter: (tmp2.d2 = tmp1.d2)
|
||||
(26 rows)
|
||||
-> Hash Left Join
|
||||
Hash Cond: (tmp1.d2 = subquery."?column?")
|
||||
Filter: (tmp1.d2 > COALESCE(subquery.count, 0))
|
||||
-> CTE Scan on tmp tmp1
|
||||
Output: tmp1.d2
|
||||
-> Hash
|
||||
Output: subquery."?column?", subquery.count
|
||||
-> Subquery Scan on subquery
|
||||
Output: subquery."?column?", subquery.count
|
||||
-> HashAggregate
|
||||
Output: count(*), tmp2.d2
|
||||
Group By Key: tmp2.d2
|
||||
-> CTE Scan on tmp tmp2
|
||||
Output: tmp2.d2
|
||||
(31 rows)
|
||||
|
||||
select * from t_subplan1 where c1 = (with tmp as (select d2 from t_subplan2 where b2=a1)
|
||||
select count(*) from (select 'abc', d2 from tmp tmp1
|
||||
@ -1467,7 +1424,7 @@ inner join t_subplan1 t3 on t3.a1=t_subplan1.c1 where t3.a1=0 order by 1,2,3,4 l
|
||||
Output: col_distribute_subplan_base_2.t_subplan1.a1, col_distribute_subplan_base_2.t_subplan1.b1, col_distribute_subplan_base_2.t_subplan1.c1, col_distribute_subplan_base_2.t_subplan1.d1, t_subplan2.a2, t_subplan2.b2, ($0), t3.a1, t3.b1, t3.c1, t3.d1
|
||||
-> Vector Nest Loop Left Join
|
||||
Output: col_distribute_subplan_base_2.t_subplan1.a1, col_distribute_subplan_base_2.t_subplan1.b1, col_distribute_subplan_base_2.t_subplan1.c1, col_distribute_subplan_base_2.t_subplan1.d1, t_subplan2.a2, t_subplan2.b2, ($0)
|
||||
Join Filter: (NULL::boolean AND (t_subplan2.b2 = col_distribute_subplan_base_2.t_subplan1.b1))
|
||||
Join Filter: false
|
||||
-> CStore Scan on col_distribute_subplan_base_2.t_subplan1
|
||||
Output: col_distribute_subplan_base_2.t_subplan1.a1, col_distribute_subplan_base_2.t_subplan1.b1, col_distribute_subplan_base_2.t_subplan1.c1, col_distribute_subplan_base_2.t_subplan1.d1
|
||||
Filter: (col_distribute_subplan_base_2.t_subplan1.c1 = 0)
|
||||
|
||||
@ -606,9 +606,9 @@ explain (verbose, costs off) SELECT collation for ((SELECT b FROM collate_test1
|
||||
Output: pg_collation_for($0)
|
||||
InitPlan 1 (returns $0)
|
||||
-> Limit
|
||||
Output: b
|
||||
Output: collate_test1.b
|
||||
-> Seq Scan on collate_tests.collate_test1
|
||||
Output: b
|
||||
Output: collate_test1.b
|
||||
(7 rows)
|
||||
|
||||
--
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
-- Tests for some likely failure cases with combo cmin/cmax mechanism
|
||||
--
|
||||
-- Enforce use of COMMIT instead of 2PC for temporary objects
|
||||
CREATE TEMP TABLE combocidtest (foobar int) distribute by replication;
|
||||
CREATE TEMP TABLE combocidtest (foobar int);
|
||||
START TRANSACTION;
|
||||
-- a few dummy ops to push up the CommandId counter
|
||||
INSERT INTO combocidtest SELECT 1 LIMIT 0;
|
||||
@ -60,8 +60,8 @@ DELETE FROM combocidtest;
|
||||
FETCH ALL FROM c;
|
||||
ctid | cmin | foobar
|
||||
-------+------+--------
|
||||
(0,1) | 2 | 1
|
||||
(0,2) | 2 | 2
|
||||
(0,1) | 1 | 1
|
||||
(0,2) | 1 | 2
|
||||
(0,5) | 0 | 333
|
||||
(3 rows)
|
||||
|
||||
@ -69,8 +69,8 @@ ROLLBACK;
|
||||
SELECT ctid,cmin,* FROM combocidtest ORDER BY ctid;
|
||||
ctid | cmin | foobar
|
||||
-------+------+--------
|
||||
(0,1) | 2 | 1
|
||||
(0,2) | 2 | 2
|
||||
(0,1) | 1 | 1
|
||||
(0,2) | 1 | 2
|
||||
(2 rows)
|
||||
|
||||
-- check behavior with locked tuples
|
||||
@ -90,8 +90,8 @@ INSERT INTO combocidtest VALUES (444);
|
||||
SELECT ctid,cmin,* FROM combocidtest ORDER BY ctid;
|
||||
ctid | cmin | foobar
|
||||
-------+------+--------
|
||||
(0,1) | 2 | 1
|
||||
(0,2) | 2 | 2
|
||||
(0,1) | 1 | 1
|
||||
(0,2) | 1 | 2
|
||||
(0,6) | 10 | 444
|
||||
(3 rows)
|
||||
|
||||
@ -100,16 +100,16 @@ SAVEPOINT s1;
|
||||
SELECT ctid,cmin,* FROM combocidtest FOR UPDATE;
|
||||
ctid | cmin | foobar
|
||||
-------+------+--------
|
||||
(0,1) | 2 | 1
|
||||
(0,2) | 2 | 2
|
||||
(0,1) | 1 | 1
|
||||
(0,2) | 1 | 2
|
||||
(0,6) | 10 | 444
|
||||
(3 rows)
|
||||
|
||||
SELECT ctid,cmin,* FROM combocidtest ORDER BY ctid;
|
||||
ctid | cmin | foobar
|
||||
-------+------+--------
|
||||
(0,1) | 2 | 1
|
||||
(0,2) | 2 | 2
|
||||
(0,1) | 1 | 1
|
||||
(0,2) | 1 | 2
|
||||
(0,6) | 10 | 444
|
||||
(3 rows)
|
||||
|
||||
@ -118,17 +118,17 @@ UPDATE combocidtest SET foobar = foobar + 10;
|
||||
SELECT ctid,cmin,* FROM combocidtest ORDER BY ctid;
|
||||
ctid | cmin | foobar
|
||||
-------+------+--------
|
||||
(0,7) | 11 | 11
|
||||
(0,8) | 11 | 12
|
||||
(0,9) | 11 | 454
|
||||
(0,7) | 12 | 11
|
||||
(0,8) | 12 | 12
|
||||
(0,9) | 12 | 454
|
||||
(3 rows)
|
||||
|
||||
ROLLBACK TO s1;
|
||||
SELECT ctid,cmin,* FROM combocidtest ORDER BY ctid;
|
||||
ctid | cmin | foobar
|
||||
-------+------+--------
|
||||
(0,1) | 11 | 1
|
||||
(0,2) | 11 | 2
|
||||
(0,1) | 12 | 1
|
||||
(0,2) | 12 | 2
|
||||
(0,6) | 0 | 444
|
||||
(3 rows)
|
||||
|
||||
|
||||
@ -2,67 +2,47 @@
|
||||
-- GiST (rtree-equivalent opclasses only)
|
||||
--
|
||||
CREATE INDEX grect2ind ON fast_emp4000 USING gist (home_base);
|
||||
|
||||
CREATE INDEX gpolygonind ON polygon_tbl USING gist (f1);
|
||||
|
||||
CREATE INDEX gcircleind ON circle_tbl USING gist (f1);
|
||||
|
||||
INSERT INTO POINT_TBL(f1) VALUES (NULL);
|
||||
|
||||
CREATE INDEX gpointind ON point_tbl USING gist (f1);
|
||||
|
||||
|
||||
--CREATE TABLE gpolygon_tbl AS
|
||||
-- SELECT polygon(home_base) AS f1 FROM slow_emp4000;
|
||||
--INSERT INTO gpolygon_tbl VALUES ( '(1000,0,0,1000)' );
|
||||
--INSERT INTO gpolygon_tbl VALUES ( '(0,1000,1000,1000)' );
|
||||
|
||||
--CREATE TABLE gcircle_tbl AS
|
||||
-- SELECT circle(home_base) AS f1 FROM slow_emp4000;
|
||||
|
||||
--CREATE INDEX ggpolygonind ON gpolygon_tbl USING gist (f1);
|
||||
|
||||
--CREATE INDEX ggcircleind ON gcircle_tbl USING gist (f1);
|
||||
|
||||
|
||||
--
|
||||
-- Test GiST indexes
|
||||
--
|
||||
|
||||
-- get non-indexed results for comparison purposes
|
||||
|
||||
SET enable_seqscan = ON;
|
||||
SET enable_indexscan = OFF;
|
||||
SET enable_bitmapscan = OFF;
|
||||
|
||||
SELECT * FROM fast_emp4000
|
||||
WHERE home_base @ '(200,200),(2000,1000)'::box
|
||||
ORDER BY (home_base[0])[0];
|
||||
home_base
|
||||
-----------------------
|
||||
(337,455),(240,359)
|
||||
(1444,403),(1346,344)
|
||||
(2 rows)
|
||||
|
||||
home_base
|
||||
-----------
|
||||
(0 rows)
|
||||
|
||||
SELECT count(*) FROM fast_emp4000 WHERE home_base && '(1000,1000,0,0)'::box;
|
||||
count
|
||||
-------
|
||||
2
|
||||
0
|
||||
(1 row)
|
||||
|
||||
|
||||
SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL;
|
||||
count
|
||||
-------
|
||||
278
|
||||
0
|
||||
(1 row)
|
||||
|
||||
|
||||
SELECT * FROM polygon_tbl WHERE f1 ~ '((1,1),(2,2),(2,1))'::polygon
|
||||
ORDER BY (poly_center(f1))[0];
|
||||
ERROR: type "line" not yet implemented
|
||||
|
||||
SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1)
|
||||
ORDER BY area(f1);
|
||||
f1
|
||||
@ -73,74 +53,62 @@ SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1)
|
||||
<(100,1),115>
|
||||
(4 rows)
|
||||
|
||||
|
||||
--SELECT count(*) FROM gpolygon_tbl WHERE f1 && '(1000,1000,0,0)'::polygon;
|
||||
|
||||
--SELECT count(*) FROM gcircle_tbl WHERE f1 && '<(500,500),500>'::circle;
|
||||
|
||||
SELECT count(*) FROM point_tbl WHERE f1 <@ box '(0,0,100,100)';
|
||||
count
|
||||
-------
|
||||
3
|
||||
(1 row)
|
||||
|
||||
|
||||
SELECT count(*) FROM point_tbl WHERE box '(0,0,100,100)' @> f1;
|
||||
count
|
||||
-------
|
||||
3
|
||||
(1 row)
|
||||
|
||||
|
||||
SELECT count(*) FROM point_tbl WHERE f1 <@ polygon '(0,0),(0,100),(100,100),(50,50),(100,0),(0,0)';
|
||||
count
|
||||
-------
|
||||
3
|
||||
(1 row)
|
||||
|
||||
|
||||
SELECT count(*) FROM point_tbl WHERE f1 <@ circle '<(50,50),50>';
|
||||
count
|
||||
-------
|
||||
1
|
||||
(1 row)
|
||||
|
||||
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 << '(0.0, 0.0)';
|
||||
count
|
||||
-------
|
||||
3
|
||||
(1 row)
|
||||
|
||||
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 >> '(0.0, 0.0)';
|
||||
count
|
||||
-------
|
||||
2
|
||||
(1 row)
|
||||
|
||||
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 <^ '(0.0, 0.0)';
|
||||
count
|
||||
-------
|
||||
1
|
||||
(1 row)
|
||||
|
||||
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 >^ '(0.0, 0.0)';
|
||||
count
|
||||
-------
|
||||
3
|
||||
(1 row)
|
||||
|
||||
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 ~= '(-5, -12)';
|
||||
count
|
||||
-------
|
||||
1
|
||||
(1 row)
|
||||
|
||||
|
||||
SELECT * FROM point_tbl ORDER BY f1 <-> '0,1';
|
||||
f1
|
||||
------------
|
||||
@ -153,14 +121,12 @@ SELECT * FROM point_tbl ORDER BY f1 <-> '0,1';
|
||||
|
||||
(7 rows)
|
||||
|
||||
|
||||
SELECT * FROM point_tbl WHERE f1 IS NULL;
|
||||
f1
|
||||
----
|
||||
|
||||
(1 row)
|
||||
|
||||
|
||||
SELECT * FROM point_tbl WHERE f1 IS NOT NULL ORDER BY f1 <-> '0,1';
|
||||
f1
|
||||
------------
|
||||
@ -172,7 +138,6 @@ SELECT * FROM point_tbl WHERE f1 IS NOT NULL ORDER BY f1 <-> '0,1';
|
||||
(5.1,34.5)
|
||||
(6 rows)
|
||||
|
||||
|
||||
SELECT * FROM point_tbl WHERE f1 <@ '(-10,-10),(10,10)':: box ORDER BY f1 <-> '0,1';
|
||||
f1
|
||||
---------
|
||||
@ -182,88 +147,83 @@ SELECT * FROM point_tbl WHERE f1 <@ '(-10,-10),(10,10)':: box ORDER BY f1 <-> '0
|
||||
(10,10)
|
||||
(4 rows)
|
||||
|
||||
|
||||
-- Now check the results from plain indexscan
|
||||
SET enable_seqscan = OFF;
|
||||
SET enable_indexscan = ON;
|
||||
SET enable_bitmapscan = OFF;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT * FROM fast_emp4000
|
||||
WHERE home_base @ '(200,200),(2000,1000)'::box
|
||||
ORDER BY (home_base[0])[0];
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: ((home_base[0])[0])
|
||||
-> Index Scan using grect2ind on fast_emp4000
|
||||
Index Cond: (home_base @ '(2000,1000),(200,200)'::box)
|
||||
(4 rows)
|
||||
|
||||
SELECT * FROM fast_emp4000
|
||||
WHERE home_base @ '(200,200),(2000,1000)'::box
|
||||
ORDER BY (home_base[0])[0];
|
||||
home_base
|
||||
-----------
|
||||
(0 rows)
|
||||
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM fast_emp4000 WHERE home_base && '(1000,1000,0,0)'::box;
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: ((fast_emp4000.home_base[0])[0])
|
||||
-> Data Node Scan on fast_emp4000 "_REMOTE_TABLE_QUERY_"
|
||||
Aggregate
|
||||
-> Index Scan using grect2ind on fast_emp4000
|
||||
Index Cond: (home_base && '(1000,1000),(0,0)'::box)
|
||||
(3 rows)
|
||||
|
||||
SELECT * FROM fast_emp4000
|
||||
WHERE home_base @ '(200,200),(2000,1000)'::box
|
||||
ORDER BY (home_base[0])[0];
|
||||
home_base
|
||||
-----------------------
|
||||
(337,455),(240,359)
|
||||
(1444,403),(1346,344)
|
||||
(2 rows)
|
||||
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
SELECT count(*) FROM fast_emp4000 WHERE home_base && '(1000,1000,0,0)'::box;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------
|
||||
Aggregate
|
||||
-> Data Node Scan on "__REMOTE_GROUP_QUERY__"
|
||||
(2 rows)
|
||||
|
||||
SELECT count(*) FROM fast_emp4000 WHERE home_base && '(1000,1000,0,0)'::box;
|
||||
count
|
||||
-------
|
||||
2
|
||||
0
|
||||
(1 row)
|
||||
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------
|
||||
Aggregate
|
||||
-> Data Node Scan on "__REMOTE_GROUP_QUERY__"
|
||||
(2 rows)
|
||||
-> Index Scan using grect2ind on fast_emp4000
|
||||
Index Cond: (home_base IS NULL)
|
||||
(3 rows)
|
||||
|
||||
SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL;
|
||||
count
|
||||
-------
|
||||
278
|
||||
0
|
||||
(1 row)
|
||||
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT * FROM polygon_tbl WHERE f1 ~ '((1,1),(2,2),(2,1))'::polygon
|
||||
ORDER BY (poly_center(f1))[0];
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
-> Sort
|
||||
Sort Key: ((poly_center(f1))[0])
|
||||
-> Index Scan using gpolygonind on polygon_tbl
|
||||
Index Cond: (f1 ~ '((1,1),(2,2),(2,1))'::polygon)
|
||||
(5 rows)
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: ((poly_center(f1))[0])
|
||||
-> Index Scan using gpolygonind on polygon_tbl
|
||||
Index Cond: (f1 ~ '((1,1),(2,2),(2,1))'::polygon)
|
||||
(4 rows)
|
||||
|
||||
SELECT * FROM polygon_tbl WHERE f1 ~ '((1,1),(2,2),(2,1))'::polygon
|
||||
ORDER BY (poly_center(f1))[0];
|
||||
ERROR: type "line" not yet implemented
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1)
|
||||
ORDER BY area(f1);
|
||||
QUERY PLAN
|
||||
-------------------------------------------------
|
||||
QUERY PLAN
|
||||
--------------------------------------------------
|
||||
Sort
|
||||
Sort Key: (area(circle_tbl.f1))
|
||||
-> Data Node Scan on "__REMOTE_SORT_QUERY__"
|
||||
(3 rows)
|
||||
Sort Key: (area(f1))
|
||||
-> Index Scan using gcircleind on circle_tbl
|
||||
Index Cond: (f1 && '<(1,-2),1>'::circle)
|
||||
(4 rows)
|
||||
|
||||
SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1)
|
||||
ORDER BY area(f1);
|
||||
@ -275,21 +235,20 @@ SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1)
|
||||
<(100,1),115>
|
||||
(4 rows)
|
||||
|
||||
|
||||
--EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
--EXPLAIN(COSTS OFF)
|
||||
--SELECT count(*) FROM gpolygon_tbl WHERE f1 && '(1000,1000,0,0)'::polygon;
|
||||
--SELECT count(*) FROM gpolygon_tbl WHERE f1 && '(1000,1000,0,0)'::polygon;
|
||||
|
||||
--EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
--EXPLAIN(COSTS OFF)
|
||||
--SELECT count(*) FROM gcircle_tbl WHERE f1 && '<(500,500),500>'::circle;
|
||||
--SELECT count(*) FROM gcircle_tbl WHERE f1 && '<(500,500),500>'::circle;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl WHERE f1 <@ box '(0,0,100,100)';
|
||||
QUERY PLAN
|
||||
----------------
|
||||
Data Node Scan
|
||||
(1 row)
|
||||
QUERY PLAN
|
||||
----------------------------------------------------
|
||||
Aggregate
|
||||
-> Index Scan using gpointind on point_tbl
|
||||
Index Cond: (f1 <@ '(100,100),(0,0)'::box)
|
||||
(3 rows)
|
||||
|
||||
SELECT count(*) FROM point_tbl WHERE f1 <@ box '(0,0,100,100)';
|
||||
count
|
||||
@ -297,13 +256,14 @@ SELECT count(*) FROM point_tbl WHERE f1 <@ box '(0,0,100,100)';
|
||||
3
|
||||
(1 row)
|
||||
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl WHERE box '(0,0,100,100)' @> f1;
|
||||
QUERY PLAN
|
||||
----------------
|
||||
Data Node Scan
|
||||
(1 row)
|
||||
QUERY PLAN
|
||||
----------------------------------------------------
|
||||
Aggregate
|
||||
-> Index Scan using gpointind on point_tbl
|
||||
Index Cond: ('(100,100),(0,0)'::box @> f1)
|
||||
(3 rows)
|
||||
|
||||
SELECT count(*) FROM point_tbl WHERE box '(0,0,100,100)' @> f1;
|
||||
count
|
||||
@ -311,13 +271,14 @@ SELECT count(*) FROM point_tbl WHERE box '(0,0,100,100)' @> f1;
|
||||
3
|
||||
(1 row)
|
||||
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl WHERE f1 <@ polygon '(0,0),(0,100),(100,100),(50,50),(100,0),(0,0)';
|
||||
QUERY PLAN
|
||||
----------------
|
||||
Data Node Scan
|
||||
(1 row)
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Index Scan using gpointind on point_tbl
|
||||
Index Cond: (f1 <@ '((0,0),(0,100),(100,100),(50,50),(100,0),(0,0))'::polygon)
|
||||
(3 rows)
|
||||
|
||||
SELECT count(*) FROM point_tbl WHERE f1 <@ polygon '(0,0),(0,100),(100,100),(50,50),(100,0),(0,0)';
|
||||
count
|
||||
@ -325,13 +286,14 @@ SELECT count(*) FROM point_tbl WHERE f1 <@ polygon '(0,0),(0,100),(100,100),(50,
|
||||
3
|
||||
(1 row)
|
||||
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl WHERE f1 <@ circle '<(50,50),50>';
|
||||
QUERY PLAN
|
||||
----------------
|
||||
Data Node Scan
|
||||
(1 row)
|
||||
QUERY PLAN
|
||||
----------------------------------------------------
|
||||
Aggregate
|
||||
-> Index Scan using gpointind on point_tbl
|
||||
Index Cond: (f1 <@ '<(50,50),50>'::circle)
|
||||
(3 rows)
|
||||
|
||||
SELECT count(*) FROM point_tbl WHERE f1 <@ circle '<(50,50),50>';
|
||||
count
|
||||
@ -339,13 +301,14 @@ SELECT count(*) FROM point_tbl WHERE f1 <@ circle '<(50,50),50>';
|
||||
1
|
||||
(1 row)
|
||||
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 << '(0.0, 0.0)';
|
||||
QUERY PLAN
|
||||
----------------
|
||||
Data Node Scan
|
||||
(1 row)
|
||||
QUERY PLAN
|
||||
-------------------------------------------------
|
||||
Aggregate
|
||||
-> Index Scan using gpointind on point_tbl p
|
||||
Index Cond: (f1 << '(0,0)'::point)
|
||||
(3 rows)
|
||||
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 << '(0.0, 0.0)';
|
||||
count
|
||||
@ -353,13 +316,14 @@ SELECT count(*) FROM point_tbl p WHERE p.f1 << '(0.0, 0.0)';
|
||||
3
|
||||
(1 row)
|
||||
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 >> '(0.0, 0.0)';
|
||||
QUERY PLAN
|
||||
----------------
|
||||
Data Node Scan
|
||||
(1 row)
|
||||
QUERY PLAN
|
||||
-------------------------------------------------
|
||||
Aggregate
|
||||
-> Index Scan using gpointind on point_tbl p
|
||||
Index Cond: (f1 >> '(0,0)'::point)
|
||||
(3 rows)
|
||||
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 >> '(0.0, 0.0)';
|
||||
count
|
||||
@ -367,13 +331,14 @@ SELECT count(*) FROM point_tbl p WHERE p.f1 >> '(0.0, 0.0)';
|
||||
2
|
||||
(1 row)
|
||||
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 <^ '(0.0, 0.0)';
|
||||
QUERY PLAN
|
||||
----------------
|
||||
Data Node Scan
|
||||
(1 row)
|
||||
QUERY PLAN
|
||||
-------------------------------------------------
|
||||
Aggregate
|
||||
-> Index Scan using gpointind on point_tbl p
|
||||
Index Cond: (f1 <^ '(0,0)'::point)
|
||||
(3 rows)
|
||||
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 <^ '(0.0, 0.0)';
|
||||
count
|
||||
@ -381,13 +346,14 @@ SELECT count(*) FROM point_tbl p WHERE p.f1 <^ '(0.0, 0.0)';
|
||||
1
|
||||
(1 row)
|
||||
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 >^ '(0.0, 0.0)';
|
||||
QUERY PLAN
|
||||
----------------
|
||||
Data Node Scan
|
||||
(1 row)
|
||||
QUERY PLAN
|
||||
-------------------------------------------------
|
||||
Aggregate
|
||||
-> Index Scan using gpointind on point_tbl p
|
||||
Index Cond: (f1 >^ '(0,0)'::point)
|
||||
(3 rows)
|
||||
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 >^ '(0.0, 0.0)';
|
||||
count
|
||||
@ -395,13 +361,14 @@ SELECT count(*) FROM point_tbl p WHERE p.f1 >^ '(0.0, 0.0)';
|
||||
3
|
||||
(1 row)
|
||||
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 ~= '(-5, -12)';
|
||||
QUERY PLAN
|
||||
----------------
|
||||
Data Node Scan
|
||||
(1 row)
|
||||
QUERY PLAN
|
||||
-------------------------------------------------
|
||||
Aggregate
|
||||
-> Index Scan using gpointind on point_tbl p
|
||||
Index Cond: (f1 ~= '(-5,-12)'::point)
|
||||
(3 rows)
|
||||
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 ~= '(-5, -12)';
|
||||
count
|
||||
@ -409,13 +376,13 @@ SELECT count(*) FROM point_tbl p WHERE p.f1 ~= '(-5, -12)';
|
||||
1
|
||||
(1 row)
|
||||
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT * FROM point_tbl ORDER BY f1 <-> '0,1';
|
||||
QUERY PLAN
|
||||
----------------
|
||||
Data Node Scan
|
||||
(1 row)
|
||||
QUERY PLAN
|
||||
-----------------------------------------
|
||||
Index Scan using gpointind on point_tbl
|
||||
Order By: (f1 <-> '(0,1)'::point)
|
||||
(2 rows)
|
||||
|
||||
SELECT * FROM point_tbl ORDER BY f1 <-> '0,1';
|
||||
f1
|
||||
@ -429,13 +396,13 @@ SELECT * FROM point_tbl ORDER BY f1 <-> '0,1';
|
||||
|
||||
(7 rows)
|
||||
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT * FROM point_tbl WHERE f1 IS NULL;
|
||||
QUERY PLAN
|
||||
----------------
|
||||
Data Node Scan
|
||||
(1 row)
|
||||
QUERY PLAN
|
||||
-----------------------------------------
|
||||
Index Scan using gpointind on point_tbl
|
||||
Index Cond: (f1 IS NULL)
|
||||
(2 rows)
|
||||
|
||||
SELECT * FROM point_tbl WHERE f1 IS NULL;
|
||||
f1
|
||||
@ -443,13 +410,14 @@ SELECT * FROM point_tbl WHERE f1 IS NULL;
|
||||
|
||||
(1 row)
|
||||
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT * FROM point_tbl WHERE f1 IS NOT NULL ORDER BY f1 <-> '0,1';
|
||||
QUERY PLAN
|
||||
----------------
|
||||
Data Node Scan
|
||||
(1 row)
|
||||
QUERY PLAN
|
||||
-----------------------------------------
|
||||
Index Scan using gpointind on point_tbl
|
||||
Index Cond: (f1 IS NOT NULL)
|
||||
Order By: (f1 <-> '(0,1)'::point)
|
||||
(3 rows)
|
||||
|
||||
SELECT * FROM point_tbl WHERE f1 IS NOT NULL ORDER BY f1 <-> '0,1';
|
||||
f1
|
||||
@ -462,13 +430,14 @@ SELECT * FROM point_tbl WHERE f1 IS NOT NULL ORDER BY f1 <-> '0,1';
|
||||
(5.1,34.5)
|
||||
(6 rows)
|
||||
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT * FROM point_tbl WHERE f1 <@ '(-10,-10),(10,10)':: box ORDER BY f1 <-> '0,1';
|
||||
QUERY PLAN
|
||||
----------------
|
||||
Data Node Scan
|
||||
(1 row)
|
||||
QUERY PLAN
|
||||
------------------------------------------------
|
||||
Index Scan using gpointind on point_tbl
|
||||
Index Cond: (f1 <@ '(10,10),(-10,-10)'::box)
|
||||
Order By: (f1 <-> '(0,1)'::point)
|
||||
(3 rows)
|
||||
|
||||
SELECT * FROM point_tbl WHERE f1 <@ '(-10,-10),(10,10)':: box ORDER BY f1 <-> '0,1';
|
||||
f1
|
||||
@ -479,18 +448,21 @@ SELECT * FROM point_tbl WHERE f1 <@ '(-10,-10),(10,10)':: box ORDER BY f1 <-> '0
|
||||
(10,10)
|
||||
(4 rows)
|
||||
|
||||
|
||||
-- Now check the results from bitmap indexscan
|
||||
SET enable_seqscan = OFF;
|
||||
SET enable_indexscan = OFF;
|
||||
SET enable_bitmapscan = ON;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT * FROM point_tbl WHERE f1 <@ '(-10,-10),(10,10)':: box ORDER BY f1 <-> '0,1';
|
||||
QUERY PLAN
|
||||
----------------
|
||||
Data Node Scan
|
||||
(1 row)
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: ((f1 <-> '(0,1)'::point))
|
||||
-> Bitmap Heap Scan on point_tbl
|
||||
Recheck Cond: (f1 <@ '(10,10),(-10,-10)'::box)
|
||||
-> Bitmap Index Scan on gpointind
|
||||
Index Cond: (f1 <@ '(10,10),(-10,-10)'::box)
|
||||
(6 rows)
|
||||
|
||||
SELECT * FROM point_tbl WHERE f1 <@ '(-10,-10),(10,10)':: box ORDER BY f1 <-> '0,1';
|
||||
f1
|
||||
@ -505,7 +477,6 @@ SELECT * FROM point_tbl WHERE f1 <@ '(-10,-10),(10,10)':: box ORDER BY f1 <-> '0
|
||||
create table t(id int, c_point point);
|
||||
insert into t select id, point'(1, 2)' from (select * from generate_series(1, 200000) as id) as x;
|
||||
create index i on t using gist(c_point) with (buffering=on);
|
||||
|
||||
RESET enable_seqscan;
|
||||
RESET enable_indexscan;
|
||||
RESET enable_bitmapscan;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -45,6 +45,7 @@ create table basictest
|
||||
INSERT INTO basictest values ('88', 'haha', 'short', '123.12'); -- Good
|
||||
INSERT INTO basictest values ('88', 'haha', 'short text', '123.12'); -- Bad varchar
|
||||
ERROR: value too long for type character varying(5)
|
||||
CONTEXT: referenced column: testvarchar
|
||||
INSERT INTO basictest values ('88', 'haha', 'short', '123.1212'); -- Truncate numeric
|
||||
-- Test copy
|
||||
COPY basictest (testvarchar) FROM stdin; -- fail
|
||||
@ -61,12 +62,12 @@ select * from basictest order by 1, 2, 3, 4;
|
||||
|
||||
-- check that domains inherit operations from base types
|
||||
select testtext || testvarchar as concat, testnumeric + 42 as sum
|
||||
from basictest;
|
||||
from basictest order by 1,2;
|
||||
concat | sum
|
||||
-----------+--------
|
||||
hahashort | 165.12
|
||||
hahashort | 165.12
|
||||
|
|
||||
short |
|
||||
(3 rows)
|
||||
|
||||
-- check that union/case/coalesce type resolution handles domains properly
|
||||
@ -107,6 +108,7 @@ INSERT INTO domarrtest values ('{2,2}', '{{"a"},{"c"}}');
|
||||
INSERT INTO domarrtest values (NULL, '{{"a","b","c"},{"d","e","f"}}');
|
||||
INSERT INTO domarrtest values (NULL, '{{"toolong","b","c"},{"d","e","f"}}');
|
||||
ERROR: value too long for type character varying(4)
|
||||
CONTEXT: referenced column: testchar4arr
|
||||
select * from domarrtest order by 1, 2;
|
||||
testint4arr | testchar4arr
|
||||
---------------+---------------------
|
||||
@ -127,13 +129,13 @@ select testint4arr[1], testchar4arr[2,2] from domarrtest order by 1, 2;
|
||||
| {{d,e,f}}
|
||||
(5 rows)
|
||||
|
||||
select array_dims(testint4arr), array_dims(testchar4arr) from domarrtest;
|
||||
select array_dims(testint4arr), array_dims(testchar4arr) from domarrtest order by 1, 2;
|
||||
array_dims | array_dims
|
||||
------------+------------
|
||||
[1:2] | [1:2][1:2]
|
||||
[1:2][1:2] | [1:1][1:2]
|
||||
[1:2] | [1:3][1:2]
|
||||
[1:2] | [1:2][1:1]
|
||||
[1:2] | [1:2][1:2]
|
||||
[1:2] | [1:3][1:2]
|
||||
[1:2][1:2] | [1:1][1:2]
|
||||
| [1:2][1:3]
|
||||
(5 rows)
|
||||
|
||||
@ -194,16 +196,20 @@ create table nulltest
|
||||
);
|
||||
INSERT INTO nulltest DEFAULT VALUES;
|
||||
ERROR: domain dnotnull does not allow null values
|
||||
CONTEXT: referenced column: col1
|
||||
INSERT INTO nulltest values ('a', 'b', 'c', 'd', 'c'); -- Good
|
||||
insert into nulltest values ('a', 'b', 'c', 'd', NULL);
|
||||
ERROR: domain dcheck does not allow null values
|
||||
CONTEXT: referenced column: col5
|
||||
insert into nulltest values ('a', 'b', 'c', 'd', 'a');
|
||||
ERROR: new row for relation "nulltest" violates check constraint "nulltest_col5_check"
|
||||
DETAIL: Failing row contains (a, b, c, d, a).
|
||||
DETAIL: N/A
|
||||
INSERT INTO nulltest values (NULL, 'b', 'c', 'd', 'd');
|
||||
ERROR: domain dnotnull does not allow null values
|
||||
CONTEXT: referenced column: col1
|
||||
INSERT INTO nulltest values ('a', NULL, 'c', 'd', 'c');
|
||||
ERROR: domain dnotnull does not allow null values
|
||||
CONTEXT: referenced column: col2
|
||||
INSERT INTO nulltest values ('a', 'b', NULL, 'd', 'c');
|
||||
ERROR: null value in column "col3" violates not-null constraint
|
||||
DETAIL: Failing row contains (a, b, null, d, c).
|
||||
@ -219,7 +225,7 @@ CONTEXT: COPY nulltest, line 1, column col5: null input
|
||||
-- Last row is bad
|
||||
COPY nulltest FROM stdin;
|
||||
ERROR: new row for relation "nulltest" violates check constraint "nulltest_col5_check"
|
||||
DETAIL: Failing row contains (a, b, c, null, a).
|
||||
DETAIL: N/A
|
||||
CONTEXT: COPY nulltest, line 3: "a b c \N a"
|
||||
select * from nulltest order by 1, 2, 3, 4, 5;
|
||||
col1 | col2 | col3 | col4 | col5
|
||||
@ -237,10 +243,13 @@ SELECT cast('1' as dnotnull);
|
||||
|
||||
SELECT cast(NULL as dnotnull); -- fail
|
||||
ERROR: domain dnotnull does not allow null values
|
||||
CONTEXT: referenced column: dnotnull
|
||||
SELECT cast(cast(NULL as dnull) as dnotnull); -- fail
|
||||
ERROR: domain dnotnull does not allow null values
|
||||
CONTEXT: referenced column: dnotnull
|
||||
SELECT cast(col4 as dnotnull) from nulltest; -- fail
|
||||
ERROR: domain dnotnull does not allow null values
|
||||
CONTEXT: referenced column: col4
|
||||
-- cleanup
|
||||
drop table nulltest;
|
||||
drop domain dnotnull restrict;
|
||||
@ -305,6 +314,7 @@ update domnotnull set col2 = 6;
|
||||
alter domain dnotnulltest set not null;
|
||||
update domnotnull set col1 = null; -- fails
|
||||
ERROR: domain dnotnulltest does not allow null values
|
||||
CONTEXT: referenced column: col1
|
||||
alter domain dnotnulltest drop not null;
|
||||
update domnotnull set col1 = null;
|
||||
drop domain dnotnulltest cascade;
|
||||
@ -314,7 +324,7 @@ drop cascades to table domnotnull column col2
|
||||
-- Test ALTER DOMAIN .. DEFAULT ..
|
||||
create table domdeftest (col1 ddef1);
|
||||
insert into domdeftest default values;
|
||||
select * from domdeftest;
|
||||
select * from domdeftest order by 1;
|
||||
col1
|
||||
------
|
||||
3
|
||||
@ -331,7 +341,7 @@ select * from domdeftest order by 1;
|
||||
|
||||
alter domain ddef1 drop default;
|
||||
insert into domdeftest default values;
|
||||
select * from domdeftest;
|
||||
select * from domdeftest order by 1;
|
||||
col1
|
||||
------
|
||||
3
|
||||
@ -351,12 +361,15 @@ alter domain con add constraint t check (VALUE < 34);
|
||||
alter domain con add check (VALUE > 0);
|
||||
insert into domcontest values (-5); -- fails
|
||||
ERROR: value for domain con violates check constraint "con_check"
|
||||
CONTEXT: referenced column: col1
|
||||
insert into domcontest values (42); -- fails
|
||||
ERROR: value for domain con violates check constraint "t"
|
||||
CONTEXT: referenced column: col1
|
||||
insert into domcontest values (5);
|
||||
alter domain con drop constraint t;
|
||||
insert into domcontest values (-5); --fails
|
||||
ERROR: value for domain con violates check constraint "con_check"
|
||||
CONTEXT: referenced column: col1
|
||||
insert into domcontest values (42);
|
||||
alter domain con drop constraint nonexistent;
|
||||
ERROR: constraint "nonexistent" of domain "con" does not exist
|
||||
@ -389,6 +402,7 @@ select * from domview order by 1;
|
||||
alter domain dom set not null;
|
||||
select * from domview; -- fail
|
||||
ERROR: domain dom does not allow null values
|
||||
CONTEXT: referenced column: col1
|
||||
alter domain dom drop not null;
|
||||
select * from domview order by 1;
|
||||
col1
|
||||
@ -400,6 +414,7 @@ select * from domview order by 1;
|
||||
alter domain dom add constraint domchkgt6 check(value > 6);
|
||||
select * from domview; --fail
|
||||
ERROR: value for domain dom violates check constraint "domchkgt6"
|
||||
CONTEXT: referenced column: col1
|
||||
alter domain dom drop constraint domchkgt6 restrict;
|
||||
select * from domview order by 1;
|
||||
col1
|
||||
@ -433,24 +448,34 @@ select 'x1234'::dtop; -- explicit coercion should truncate
|
||||
|
||||
select 'y1234'::dtop; -- fail
|
||||
ERROR: value for domain dtop violates check constraint "dinter_check"
|
||||
CONTEXT: referenced column: dtop
|
||||
select 'y123'::dtop; -- fail
|
||||
ERROR: value for domain dtop violates check constraint "dinter_check"
|
||||
CONTEXT: referenced column: dtop
|
||||
select 'yz23'::dtop; -- fail
|
||||
ERROR: value for domain dtop violates check constraint "dinter_check"
|
||||
CONTEXT: referenced column: dtop
|
||||
select 'xz23'::dtop; -- fail
|
||||
ERROR: value for domain dtop violates check constraint "dtop_check"
|
||||
CONTEXT: referenced column: dtop
|
||||
-- Enforce use of COMMIT instead of 2PC for temporary objects
|
||||
create temp table dtest(f1 dtop);
|
||||
insert into dtest values('x123');
|
||||
insert into dtest values('x1234'); -- fail, implicit coercion
|
||||
ERROR: value too long for type character varying(4)
|
||||
CONTEXT: referenced column: f1
|
||||
insert into dtest values('y1234'); -- fail, implicit coercion
|
||||
ERROR: value too long for type character varying(4)
|
||||
CONTEXT: referenced column: f1
|
||||
insert into dtest values('y123'); -- fail
|
||||
ERROR: value for domain dtop violates check constraint "dinter_check"
|
||||
CONTEXT: referenced column: f1
|
||||
insert into dtest values('yz23'); -- fail
|
||||
ERROR: value for domain dtop violates check constraint "dinter_check"
|
||||
CONTEXT: referenced column: f1
|
||||
insert into dtest values('xz23'); -- fail
|
||||
ERROR: value for domain dtop violates check constraint "dtop_check"
|
||||
CONTEXT: referenced column: f1
|
||||
drop table dtest;
|
||||
drop domain vchar4 cascade;
|
||||
NOTICE: drop cascades to 2 other objects
|
||||
@ -494,6 +519,7 @@ end$$ language plpgsql;
|
||||
select doubledecrement(3); -- fail because of implicit null assignment
|
||||
ERROR: domain pos_int does not allow null values
|
||||
CONTEXT: PL/pgSQL function doubledecrement(pos_int) line 3 during statement block local variable initialization
|
||||
referenced column: doubledecrement
|
||||
create or replace function doubledecrement(p1 pos_int) returns pos_int as $$
|
||||
declare v pos_int := 0;
|
||||
begin
|
||||
@ -502,6 +528,7 @@ end$$ language plpgsql;
|
||||
select doubledecrement(3); -- fail at initialization assignment
|
||||
ERROR: value for domain pos_int violates check constraint "pos_int_check"
|
||||
CONTEXT: PL/pgSQL function doubledecrement(pos_int) line 3 during statement block local variable initialization
|
||||
referenced column: doubledecrement
|
||||
create or replace function doubledecrement(p1 pos_int) returns pos_int as $$
|
||||
declare v pos_int := 1;
|
||||
begin
|
||||
@ -510,14 +537,18 @@ begin
|
||||
end$$ language plpgsql;
|
||||
select doubledecrement(null); -- fail before call
|
||||
ERROR: domain pos_int does not allow null values
|
||||
CONTEXT: referenced column: doubledecrement
|
||||
select doubledecrement(0); -- fail before call
|
||||
ERROR: value for domain pos_int violates check constraint "pos_int_check"
|
||||
CONTEXT: referenced column: doubledecrement
|
||||
select doubledecrement(1); -- fail at assignment to v
|
||||
ERROR: value for domain pos_int violates check constraint "pos_int_check"
|
||||
CONTEXT: PL/pgSQL function doubledecrement(pos_int) line 4 at assignment
|
||||
referenced column: doubledecrement
|
||||
select doubledecrement(2); -- fail at return
|
||||
ERROR: value for domain pos_int violates check constraint "pos_int_check"
|
||||
CONTEXT: PL/pgSQL function doubledecrement(pos_int) while casting return value to function's return type
|
||||
referenced column: doubledecrement
|
||||
select doubledecrement(3); -- good
|
||||
doubledecrement
|
||||
-----------------
|
||||
@ -543,8 +574,10 @@ create domain posint2 as posint check (value % 2 = 0);
|
||||
create table ddtest2(f1 posint2);
|
||||
insert into ddtest2 values(11); -- fail
|
||||
ERROR: value for domain posint2 violates check constraint "posint2_check"
|
||||
CONTEXT: referenced column: f1
|
||||
insert into ddtest2 values(-2); -- fail
|
||||
ERROR: value for domain posint2 violates check constraint "c1"
|
||||
CONTEXT: referenced column: f1
|
||||
insert into ddtest2 values(2);
|
||||
alter domain posint add constraint c2 check(value >= 10); -- fail
|
||||
ERROR: column "f1" of table "ddtest2" contains values that violate the new constraint
|
||||
@ -567,6 +600,7 @@ select array_elem_check(121.00);
|
||||
ERROR: numeric field overflow
|
||||
DETAIL: A field with precision 4, scale 2 must round to an absolute value less than 10^2.
|
||||
CONTEXT: PL/pgSQL function array_elem_check(numeric) line 5 at assignment
|
||||
referenced column: array_elem_check
|
||||
select array_elem_check(1.23456);
|
||||
array_elem_check
|
||||
------------------
|
||||
@ -585,6 +619,7 @@ select array_elem_check(121.00);
|
||||
ERROR: numeric field overflow
|
||||
DETAIL: A field with precision 4, scale 2 must round to an absolute value less than 10^2.
|
||||
CONTEXT: PL/pgSQL function array_elem_check(numeric) line 5 at assignment
|
||||
referenced column: array_elem_check
|
||||
select array_elem_check(1.23456);
|
||||
array_elem_check
|
||||
------------------
|
||||
@ -603,6 +638,7 @@ select array_elem_check(121.00);
|
||||
ERROR: numeric field overflow
|
||||
DETAIL: A field with precision 4, scale 2 must round to an absolute value less than 10^2.
|
||||
CONTEXT: PL/pgSQL function array_elem_check(numeric) line 5 at assignment
|
||||
referenced column: array_elem_check
|
||||
select array_elem_check(1.23456);
|
||||
array_elem_check
|
||||
------------------
|
||||
@ -622,13 +658,16 @@ select array[1,2]::orderedpair;
|
||||
|
||||
select array[2,1]::orderedpair; -- fail
|
||||
ERROR: value for domain orderedpair violates check constraint "orderedpair_check"
|
||||
CONTEXT: referenced column: array
|
||||
create temp table op (f1 orderedpair);
|
||||
insert into op values (array[1,2]);
|
||||
insert into op values (array[2,1]); -- fail
|
||||
ERROR: value for domain orderedpair violates check constraint "orderedpair_check"
|
||||
CONTEXT: referenced column: f1
|
||||
update op set f1[2] = 3;
|
||||
update op set f1[2] = 0; -- fail
|
||||
ERROR: value for domain orderedpair violates check constraint "orderedpair_check"
|
||||
CONTEXT: referenced column: f1
|
||||
select * from op;
|
||||
f1
|
||||
-------
|
||||
@ -651,6 +690,7 @@ select array_elem_check(3);
|
||||
select array_elem_check(-1);
|
||||
ERROR: value for domain orderedpair violates check constraint "orderedpair_check"
|
||||
CONTEXT: PL/pgSQL function array_elem_check(integer) line 5 at assignment
|
||||
referenced column: array_elem_check
|
||||
drop function array_elem_check(int);
|
||||
--
|
||||
-- Renaming
|
||||
@ -663,6 +703,4 @@ drop domain testdomain3;
|
||||
-- Renaming domain constraints
|
||||
--
|
||||
create domain testdomain1 as int constraint unsigned check (value > 0);
|
||||
alter domain testdomain1 rename constraint unsigned to unsigned_foo;
|
||||
alter domain testdomain1 drop constraint unsigned_foo;
|
||||
drop domain testdomain1;
|
||||
|
||||
@ -53,19 +53,19 @@ select weekday, #hll_add_agg(hll_hash_integer(id)) as unique_users from traffic
|
||||
weekday | unique_users
|
||||
---------+------------------
|
||||
1 | 100
|
||||
2 | 203.813355588808
|
||||
3 | 308.048239950384
|
||||
4 | 410.529188080374
|
||||
5 | 514.549096958669
|
||||
6 | 513.263875705319
|
||||
7 | 513.263875705319
|
||||
2 | 200.217861303237
|
||||
3 | 301.76494508014
|
||||
4 | 400.862650860414
|
||||
5 | 502.626444091693
|
||||
6 | 502.626933349694
|
||||
7 | 502.626933349694
|
||||
(7 rows)
|
||||
|
||||
-- should be around 500
|
||||
select #hll_union_agg(users) from report;
|
||||
?column?
|
||||
------------------
|
||||
514.549096958669
|
||||
503.657946119357
|
||||
(1 row)
|
||||
|
||||
drop table traffic;
|
||||
@ -103,20 +103,20 @@ SELECT date, hll_cardinality(users) FROM daily_uniques order by date;
|
||||
date | hll_cardinality
|
||||
--------------------------+------------------
|
||||
Wed Feb 20 00:00:00 2019 | 100
|
||||
Thu Feb 21 00:00:00 2019 | 203.813355588808
|
||||
Fri Feb 22 00:00:00 2019 | 308.048239950384
|
||||
Sat Feb 23 00:00:00 2019 | 410.529188080374
|
||||
Sun Feb 24 00:00:00 2019 | 513.263875705319
|
||||
Mon Feb 25 00:00:00 2019 | 609.271181107416
|
||||
Tue Feb 26 00:00:00 2019 | 702.941844662509
|
||||
Wed Feb 27 00:00:00 2019 | 792.249946595237
|
||||
Thu Feb 21 00:00:00 2019 | 200.217913059312
|
||||
Fri Feb 22 00:00:00 2019 | 301.76494508014
|
||||
Sat Feb 23 00:00:00 2019 | 400.862858326446
|
||||
Sun Feb 24 00:00:00 2019 | 502.626933349694
|
||||
Mon Feb 25 00:00:00 2019 | 601.922606454213
|
||||
Tue Feb 26 00:00:00 2019 | 696.602316769498
|
||||
Wed Feb 27 00:00:00 2019 | 798.111731634412
|
||||
(8 rows)
|
||||
|
||||
-- ask for one week uniques
|
||||
SELECT hll_cardinality(hll_union_agg(users)) FROM daily_uniques WHERE date >= '2019-02-20'::date AND date <= '2019-02-26'::date;
|
||||
hll_cardinality
|
||||
------------------
|
||||
702.941844662509
|
||||
696.602316769498
|
||||
(1 row)
|
||||
|
||||
-- or a sliding window of uniques over the past 6 days
|
||||
@ -126,13 +126,13 @@ WINDOW seven_days AS (ORDER BY date ASC ROWS 6 PRECEDING);
|
||||
date | ?column?
|
||||
--------------------------+------------------
|
||||
Wed Feb 20 00:00:00 2019 | 100
|
||||
Thu Feb 21 00:00:00 2019 | 203.813355588808
|
||||
Fri Feb 22 00:00:00 2019 | 308.048239950384
|
||||
Sat Feb 23 00:00:00 2019 | 410.529188080374
|
||||
Sun Feb 24 00:00:00 2019 | 513.263875705319
|
||||
Mon Feb 25 00:00:00 2019 | 609.271181107416
|
||||
Tue Feb 26 00:00:00 2019 | 702.941844662509
|
||||
Wed Feb 27 00:00:00 2019 | 792.249946595237
|
||||
Thu Feb 21 00:00:00 2019 | 200.217913059312
|
||||
Fri Feb 22 00:00:00 2019 | 301.76494508014
|
||||
Sat Feb 23 00:00:00 2019 | 400.862858326446
|
||||
Sun Feb 24 00:00:00 2019 | 502.626933349694
|
||||
Mon Feb 25 00:00:00 2019 | 601.922606454213
|
||||
Tue Feb 26 00:00:00 2019 | 696.602316769498
|
||||
Wed Feb 27 00:00:00 2019 | 798.111731634412
|
||||
(8 rows)
|
||||
|
||||
-- or the number of uniques you saw yesterday that you did not see today
|
||||
@ -170,7 +170,7 @@ select hll_cardinality(hll_add_agg(hll_text)) , hll_cardinality(hll_add_agg(hll_
|
||||
) x;
|
||||
hll_cardinality | hll_cardinality
|
||||
------------------+------------------
|
||||
1017.70298739098 | 492.809273714462
|
||||
995.709856341669 | 502.624949567292
|
||||
(1 row)
|
||||
|
||||
select hll_cardinality(hll_union_agg(hll_add_value))
|
||||
@ -180,7 +180,7 @@ select hll_cardinality(hll_union_agg(hll_add_value))
|
||||
) x;
|
||||
hll_cardinality
|
||||
------------------
|
||||
492.809273714462
|
||||
502.624949567292
|
||||
(1 row)
|
||||
|
||||
select hll_cardinality(hll_union_agg(hll_add_value))
|
||||
@ -190,7 +190,7 @@ select hll_cardinality(hll_union_agg(hll_add_value))
|
||||
) x;
|
||||
hll_cardinality
|
||||
------------------
|
||||
504.289839437176
|
||||
496.450281194173
|
||||
(1 row)
|
||||
|
||||
select hll_cardinality(hll_union_agg(hll_add_value))
|
||||
@ -203,7 +203,7 @@ select hll_cardinality(hll_union_agg(hll_add_value))
|
||||
) x;
|
||||
hll_cardinality
|
||||
------------------
|
||||
1017.70298739098
|
||||
995.709856341669
|
||||
(1 row)
|
||||
|
||||
insert into test_name1
|
||||
@ -213,7 +213,7 @@ insert into test_name1
|
||||
select hll_cardinality(hll_union_agg(name1)) from test_name1;
|
||||
hll_cardinality
|
||||
------------------
|
||||
510.695850290471
|
||||
499.542425550241
|
||||
(1 row)
|
||||
|
||||
insert into test_name1_name2
|
||||
@ -223,7 +223,7 @@ insert into test_name1_name2
|
||||
select hll_cardinality(hll_union_agg(name1_name2)) from test_name1_name2;
|
||||
hll_cardinality
|
||||
------------------
|
||||
504.289839437176
|
||||
496.450281194173
|
||||
(1 row)
|
||||
|
||||
drop table test_hll;
|
||||
@ -249,56 +249,56 @@ insert into t_b_cd_hll select b, hll_add_agg(hll_hash_text(c||d)) from t_data g
|
||||
select a, #c from t_a_c_hll order by a;
|
||||
a | ?column?
|
||||
---+------------------
|
||||
0 | 250.741759091658
|
||||
1 | 250.741759091658
|
||||
0 | 247.862354346299
|
||||
1 | 250.908710610377
|
||||
(2 rows)
|
||||
|
||||
select a, #cd from t_a_cd_hll order by a;
|
||||
a | ?column?
|
||||
---+------------------
|
||||
0 | 250.741759091658
|
||||
1 | 245.098327579089
|
||||
0 | 249.894992356239
|
||||
1 | 250.910160017494
|
||||
(2 rows)
|
||||
|
||||
select b, #c from t_b_c_hll order by b;
|
||||
b | ?column?
|
||||
---+------------------
|
||||
0 | 165.511411011356
|
||||
1 | 169.852695095884
|
||||
2 | 170.939455535288
|
||||
0 | 165.837309898492
|
||||
1 | 164.828002932655
|
||||
2 | 166.848221800016
|
||||
(3 rows)
|
||||
|
||||
select b, #cd from t_b_cd_hll order by b;
|
||||
b | ?column?
|
||||
---+------------------
|
||||
0 | 167.680902739657
|
||||
1 | 164.427526360495
|
||||
2 | 164.427526360495
|
||||
0 | 164.828159955429
|
||||
1 | 167.858709928037
|
||||
2 | 165.838429363155
|
||||
(3 rows)
|
||||
|
||||
--should all be around 500
|
||||
select #hll_union_agg(c) from t_a_c_hll;
|
||||
?column?
|
||||
------------------
|
||||
496.628982624022
|
||||
498.496062953313
|
||||
(1 row)
|
||||
|
||||
select #hll_union_agg(cd) from t_a_cd_hll;
|
||||
?column?
|
||||
------------------
|
||||
495.354954589157
|
||||
499.540451882883
|
||||
(1 row)
|
||||
|
||||
select #hll_union_agg(c) from t_b_c_hll;
|
||||
?column?
|
||||
------------------
|
||||
496.628982624022
|
||||
498.496062953313
|
||||
(1 row)
|
||||
|
||||
select #hll_union_agg(cd) from t_b_cd_hll;
|
||||
?column?
|
||||
------------------
|
||||
495.354954589157
|
||||
499.540451882883
|
||||
(1 row)
|
||||
|
||||
--prepare
|
||||
@ -306,13 +306,13 @@ prepare p1(int) as select a, hll_cardinality( hll_add_agg(hll_hash_text(c)) || h
|
||||
execute p1(0);
|
||||
a | hll_cardinality
|
||||
---+------------------
|
||||
0 | 250.741759091658
|
||||
0 | 247.862354346299
|
||||
(1 row)
|
||||
|
||||
execute p1(1);
|
||||
a | hll_cardinality
|
||||
---+------------------
|
||||
1 | 250.741759091658
|
||||
1 | 250.908710610377
|
||||
(1 row)
|
||||
|
||||
deallocate p1;
|
||||
@ -320,19 +320,19 @@ prepare p2(int) as select b, hll_cardinality( hll_add_agg(hll_hash_text(c)) || h
|
||||
execute p2(0);
|
||||
b | hll_cardinality
|
||||
---+------------------
|
||||
0 | 165.511411011356
|
||||
0 | 165.837309898492
|
||||
(1 row)
|
||||
|
||||
execute p2(1);
|
||||
b | hll_cardinality
|
||||
---+------------------
|
||||
1 | 169.852695095884
|
||||
1 | 164.828002932655
|
||||
(1 row)
|
||||
|
||||
execute p2(2);
|
||||
b | hll_cardinality
|
||||
---+------------------
|
||||
2 | 170.939455535288
|
||||
2 | 166.848221800016
|
||||
(1 row)
|
||||
|
||||
deallocate p2;
|
||||
@ -342,13 +342,13 @@ declare c cursor for select a, hll_cardinality( hll_add_agg(hll_hash_text(c)) |
|
||||
fetch next from c;
|
||||
a | hll_cardinality
|
||||
---+------------------
|
||||
0 | 250.741759091658
|
||||
0 | 247.862354346299
|
||||
(1 row)
|
||||
|
||||
fetch next from c;
|
||||
a | hll_cardinality
|
||||
---+------------------
|
||||
1 | 250.741759091658
|
||||
1 | 250.908710610377
|
||||
(1 row)
|
||||
|
||||
close c;
|
||||
@ -358,19 +358,19 @@ declare c cursor for select b, hll_cardinality( hll_add_agg(hll_hash_text(c)) |
|
||||
fetch next from c;
|
||||
b | hll_cardinality
|
||||
---+------------------
|
||||
0 | 165.511411011356
|
||||
0 | 165.837309898492
|
||||
(1 row)
|
||||
|
||||
fetch next from c;
|
||||
b | hll_cardinality
|
||||
---+------------------
|
||||
1 | 169.852695095884
|
||||
1 | 164.828002932655
|
||||
(1 row)
|
||||
|
||||
fetch next from c;
|
||||
b | hll_cardinality
|
||||
---+------------------
|
||||
2 | 170.939455535288
|
||||
2 | 166.848221800016
|
||||
(1 row)
|
||||
|
||||
close c;
|
||||
|
||||
@ -8,8 +8,8 @@ create table test_schema.test_table(
|
||||
ADDRESS varchar2(20) NOT NULL,
|
||||
TELE varchar2(20) DEFAULT '101'
|
||||
);
|
||||
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "TEST_TABLE_PKEY" for table "TEST_TABLE"
|
||||
NOTICE: CREATE TABLE / UNIQUE will create implicit index "TEST_TABLE_NAME_KEY" for table "TEST_TABLE"
|
||||
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "test_table_pkey" for table "test_table"
|
||||
NOTICE: CREATE TABLE / UNIQUE will create implicit index "test_table_name_key" for table "test_table"
|
||||
insert into test_schema.test_table values(1,'steve',10,'adsf');
|
||||
insert into test_schema.test_table values(2,'warfield',20,'zcv','234');
|
||||
insert into test_schema.test_table values(3,'henry',30,'zcv','567');
|
||||
@ -33,7 +33,7 @@ $$LANGUAGE plpgsql;
|
||||
call sp_declare1();
|
||||
INFO: NAME1 is steve
|
||||
INFO: NAME2 is warfield
|
||||
SP_DECLARE1
|
||||
sp_declare1
|
||||
-------------
|
||||
0
|
||||
(1 row)
|
||||
@ -65,7 +65,7 @@ call sp_declare2();
|
||||
INFO: ID is 1
|
||||
INFO: ID is 2
|
||||
INFO: ID is 3
|
||||
SP_DECLARE2
|
||||
sp_declare2
|
||||
-------------
|
||||
0
|
||||
(1 row)
|
||||
@ -98,7 +98,7 @@ INFO: NAME is steve
|
||||
INFO: AGE is 10
|
||||
INFO: ADDRESS is adsf
|
||||
INFO: TELE is 101
|
||||
SP_BLOCK1
|
||||
sp_block1
|
||||
-----------
|
||||
0
|
||||
(1 row)
|
||||
@ -128,21 +128,24 @@ END;
|
||||
$$LANGUAGE plpgsql;
|
||||
select sp_block2(1000);
|
||||
INFO: EXCEPTION is NO_DATA_FOUND
|
||||
SP_BLOCK2
|
||||
CONTEXT: referenced column: sp_block2
|
||||
sp_block2
|
||||
-----------
|
||||
0
|
||||
(1 row)
|
||||
|
||||
select sp_block2(2);
|
||||
INFO: name is henry
|
||||
SP_BLOCK2
|
||||
CONTEXT: referenced column: sp_block2
|
||||
sp_block2
|
||||
-----------
|
||||
0
|
||||
(1 row)
|
||||
|
||||
select sp_block2(0);
|
||||
INFO: EXCEPTION is TOO_MANY_ROWS
|
||||
SP_BLOCK2
|
||||
CONTEXT: referenced column: sp_block2
|
||||
sp_block2
|
||||
-----------
|
||||
0
|
||||
(1 row)
|
||||
@ -165,7 +168,7 @@ END;
|
||||
$$LANGUAGE plpgsql;
|
||||
call sp_block3();
|
||||
INFO: NAME is steve
|
||||
SP_BLOCK3
|
||||
sp_block3
|
||||
-----------
|
||||
0
|
||||
(1 row)
|
||||
@ -187,7 +190,7 @@ END;
|
||||
$$LANGUAGE plpgsql;
|
||||
call sp_block4();
|
||||
INFO: TELE IS MMM
|
||||
SP_BLOCK4
|
||||
sp_block4
|
||||
-----------
|
||||
0
|
||||
(1 row)
|
||||
@ -207,7 +210,8 @@ END;
|
||||
$$LANGUAGE plpgsql;
|
||||
select sp_block5('MMM');
|
||||
INFO: TELE IS MMM
|
||||
SP_BLOCK5
|
||||
CONTEXT: referenced column: sp_block5
|
||||
sp_block5
|
||||
-----------
|
||||
0
|
||||
(1 row)
|
||||
@ -239,9 +243,9 @@ call sp_tempsp6();
|
||||
NOTICE: MYCHAR is THIS IS TEST
|
||||
CONTEXT: SQL statement "call sp_block6(:a)"
|
||||
PL/pgSQL function inline_code_block line 1 at EXECUTE statement
|
||||
PL/pgSQL function SP_TEMPSP6() line 7 at EXECUTE statement
|
||||
PL/pgSQL function sp_tempsp6() line 8 at EXECUTE statement
|
||||
INFO: MYCHAR is sp_block is called
|
||||
SP_TEMPSP6
|
||||
sp_tempsp6
|
||||
------------
|
||||
0
|
||||
(1 row)
|
||||
@ -280,9 +284,9 @@ call sp_tempsp7();
|
||||
INFO: MYINTEGER is 1
|
||||
CONTEXT: SQL statement "call sp_block7(:a,:b)"
|
||||
PL/pgSQL function inline_code_block line 1 at EXECUTE statement
|
||||
PL/pgSQL function SP_TEMPSP7() line 8 at EXECUTE statement
|
||||
PL/pgSQL function sp_tempsp7() line 9 at EXECUTE statement
|
||||
INFO: MYCHAR is sp_block is called
|
||||
SP_TEMPSP7
|
||||
sp_tempsp7
|
||||
------------
|
||||
0
|
||||
(1 row)
|
||||
@ -301,7 +305,7 @@ END;
|
||||
$$LANGUAGE plpgsql;
|
||||
call sp_block8(:a);
|
||||
NOTICE: NAME is warfield
|
||||
RETURNCODE
|
||||
returncode
|
||||
------------
|
||||
|
||||
(1 row)
|
||||
@ -320,7 +324,7 @@ END;
|
||||
$$LANGUAGE plpgsql;
|
||||
call sp_block9(:a);
|
||||
NOTICE: NAME is steve
|
||||
RETURNCODE
|
||||
returncode
|
||||
------------
|
||||
|
||||
(1 row)
|
||||
@ -360,7 +364,7 @@ call sp_block11();
|
||||
INFO: result is:101
|
||||
INFO: result is:202
|
||||
INFO: result is:404
|
||||
SP_BLOCK11
|
||||
sp_block11
|
||||
------------
|
||||
|
||||
(1 row)
|
||||
@ -389,7 +393,7 @@ BEGIN
|
||||
END;
|
||||
$$LANGUAGE plpgsql;
|
||||
call sp_insert1();
|
||||
SP_INSERT1
|
||||
sp_insert1
|
||||
------------
|
||||
0
|
||||
(1 row)
|
||||
@ -487,8 +491,8 @@ begin
|
||||
using in b, in c;
|
||||
end;
|
||||
/
|
||||
ERROR: query has no destination for result data
|
||||
CONTEXT: PL/pgSQL function inline_code_block line 8 at EXECUTE statement
|
||||
ERROR: query has no destination for result data in EXECUTE statement
|
||||
CONTEXT: PL/pgSQL function inline_code_block line 7 at EXECUTE statement
|
||||
drop table test;
|
||||
CREATE OR REPLACE PROCEDURE sp_test_1
|
||||
(
|
||||
@ -541,7 +545,7 @@ begin
|
||||
end;
|
||||
/
|
||||
select * from test;
|
||||
ID | NAME | ADD1
|
||||
id | name | add1
|
||||
----+-----------+-----------
|
||||
4 | july | henan
|
||||
6 | june | xian
|
||||
@ -558,6 +562,11 @@ AS
|
||||
BEGIN
|
||||
END SP_HW_SUB_ADDMODULES ;
|
||||
/
|
||||
ERROR: end label "sp_hw_sub_addmodules" specified for unlabelled block
|
||||
LINE 2: END SP_HW_SUB_ADDMODULES
|
||||
^
|
||||
QUERY: DECLARE BEGIN
|
||||
END SP_HW_SUB_ADDMODULES
|
||||
create or replace PROCEDURE sp_test
|
||||
(
|
||||
temp IN varchar2
|
||||
@ -574,12 +583,14 @@ BEGIN
|
||||
EXECUTE IMMEDIATE PSV_SQL;
|
||||
END;
|
||||
/
|
||||
ERROR: schema "dbms_output" does not exist
|
||||
CONTEXT: compilation of PL/pgSQL function "sp_test" near line 3
|
||||
call sp_test('jack');
|
||||
BEGIN SP_HW_SUB_ADDMODULES(:1,'jack'); END;
|
||||
ERROR: the number of place holders doesn't match the number of parameters.
|
||||
CONTEXT: PL/pgSQL function SP_TEST(CHARACTER VARYING) line 9 at EXECUTE statement
|
||||
ERROR: function "sp_test" doesn't exist
|
||||
drop procedure SP_HW_SUB_ADDMODULES;
|
||||
ERROR: function sp_hw_sub_addmodules does not exist
|
||||
drop procedure sp_test;
|
||||
ERROR: function sp_test does not exist
|
||||
--Dynamic SQL Anonymous Block TEST
|
||||
--CREATE schema and table ,INSERT data
|
||||
CREATE SCHEMA test_schema;
|
||||
@ -590,8 +601,8 @@ create table test_schema.test_table(
|
||||
ADDRESS varchar2(20) NOT NULL,
|
||||
TELE varchar2(20) DEFAULT '101'
|
||||
);
|
||||
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "TEST_TABLE_PKEY" for table "TEST_TABLE"
|
||||
NOTICE: CREATE TABLE / UNIQUE will create implicit index "TEST_TABLE_NAME_KEY" for table "TEST_TABLE"
|
||||
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "test_table_pkey" for table "test_table"
|
||||
NOTICE: CREATE TABLE / UNIQUE will create implicit index "test_table_name_key" for table "test_table"
|
||||
insert into test_schema.test_table values(1,'steve',10,'adsf');
|
||||
insert into test_schema.test_table values(2,'warfield',20,'zcv','234');
|
||||
insert into test_schema.test_table values(3,'henry',30,'zcv','567');
|
||||
@ -615,7 +626,7 @@ $$LANGUAGE plpgsql;
|
||||
call sp_declare1();
|
||||
INFO: NAME1 is steve
|
||||
INFO: NAME2 is warfield
|
||||
SP_DECLARE1
|
||||
sp_declare1
|
||||
-------------
|
||||
0
|
||||
(1 row)
|
||||
@ -647,7 +658,7 @@ call sp_declare2();
|
||||
INFO: ID is 1
|
||||
INFO: ID is 2
|
||||
INFO: ID is 3
|
||||
SP_DECLARE2
|
||||
sp_declare2
|
||||
-------------
|
||||
0
|
||||
(1 row)
|
||||
@ -680,7 +691,7 @@ INFO: NAME is steve
|
||||
INFO: AGE is 10
|
||||
INFO: ADDRESS is adsf
|
||||
INFO: TELE is 101
|
||||
SP_BLOCK1
|
||||
sp_block1
|
||||
-----------
|
||||
0
|
||||
(1 row)
|
||||
@ -710,21 +721,24 @@ END;
|
||||
$$LANGUAGE plpgsql;
|
||||
select sp_block2(1000);
|
||||
INFO: EXCEPTION is NO_DATA_FOUND
|
||||
SP_BLOCK2
|
||||
CONTEXT: referenced column: sp_block2
|
||||
sp_block2
|
||||
-----------
|
||||
0
|
||||
(1 row)
|
||||
|
||||
select sp_block2(2);
|
||||
INFO: name is henry
|
||||
SP_BLOCK2
|
||||
CONTEXT: referenced column: sp_block2
|
||||
sp_block2
|
||||
-----------
|
||||
0
|
||||
(1 row)
|
||||
|
||||
select sp_block2(0);
|
||||
INFO: EXCEPTION is TOO_MANY_ROWS
|
||||
SP_BLOCK2
|
||||
CONTEXT: referenced column: sp_block2
|
||||
sp_block2
|
||||
-----------
|
||||
0
|
||||
(1 row)
|
||||
@ -747,7 +761,7 @@ END;
|
||||
$$LANGUAGE plpgsql;
|
||||
call sp_block3();
|
||||
INFO: NAME is steve
|
||||
SP_BLOCK3
|
||||
sp_block3
|
||||
-----------
|
||||
0
|
||||
(1 row)
|
||||
@ -769,7 +783,7 @@ END;
|
||||
$$LANGUAGE plpgsql;
|
||||
call sp_block4();
|
||||
INFO: TELE IS MMM
|
||||
SP_BLOCK4
|
||||
sp_block4
|
||||
-----------
|
||||
0
|
||||
(1 row)
|
||||
@ -789,7 +803,8 @@ END;
|
||||
$$LANGUAGE plpgsql;
|
||||
select sp_block5('MMM');
|
||||
INFO: TELE IS MMM
|
||||
SP_BLOCK5
|
||||
CONTEXT: referenced column: sp_block5
|
||||
sp_block5
|
||||
-----------
|
||||
0
|
||||
(1 row)
|
||||
@ -821,9 +836,9 @@ call sp_tempsp6();
|
||||
NOTICE: MYCHAR is THIS IS TEST
|
||||
CONTEXT: SQL statement "call sp_block6(:a)"
|
||||
PL/pgSQL function inline_code_block line 1 at EXECUTE statement
|
||||
PL/pgSQL function SP_TEMPSP6() line 7 at EXECUTE statement
|
||||
PL/pgSQL function sp_tempsp6() line 8 at EXECUTE statement
|
||||
INFO: MYCHAR is sp_block is called
|
||||
SP_TEMPSP6
|
||||
sp_tempsp6
|
||||
------------
|
||||
0
|
||||
(1 row)
|
||||
@ -862,9 +877,9 @@ call sp_tempsp7();
|
||||
INFO: MYINTEGER is 1
|
||||
CONTEXT: SQL statement "call sp_block7(:a,:b)"
|
||||
PL/pgSQL function inline_code_block line 1 at EXECUTE statement
|
||||
PL/pgSQL function SP_TEMPSP7() line 8 at EXECUTE statement
|
||||
PL/pgSQL function sp_tempsp7() line 9 at EXECUTE statement
|
||||
INFO: MYCHAR is sp_block is called
|
||||
SP_TEMPSP7
|
||||
sp_tempsp7
|
||||
------------
|
||||
0
|
||||
(1 row)
|
||||
@ -883,7 +898,7 @@ END;
|
||||
$$LANGUAGE plpgsql;
|
||||
call sp_block8(:a);
|
||||
NOTICE: NAME is warfield
|
||||
RETURNCODE
|
||||
returncode
|
||||
------------
|
||||
|
||||
(1 row)
|
||||
@ -902,7 +917,7 @@ END;
|
||||
$$LANGUAGE plpgsql;
|
||||
call sp_block9(:a);
|
||||
NOTICE: NAME is steve
|
||||
RETURNCODE
|
||||
returncode
|
||||
------------
|
||||
|
||||
(1 row)
|
||||
@ -942,7 +957,7 @@ call sp_block11();
|
||||
INFO: result is:101
|
||||
INFO: result is:202
|
||||
INFO: result is:404
|
||||
SP_BLOCK11
|
||||
sp_block11
|
||||
------------
|
||||
|
||||
(1 row)
|
||||
@ -971,7 +986,7 @@ BEGIN
|
||||
END;
|
||||
$$LANGUAGE plpgsql;
|
||||
call sp_insert1();
|
||||
SP_INSERT1
|
||||
sp_insert1
|
||||
------------
|
||||
0
|
||||
(1 row)
|
||||
@ -1069,8 +1084,8 @@ begin
|
||||
using in b, in c;
|
||||
end;
|
||||
/
|
||||
ERROR: query has no destination for result data
|
||||
CONTEXT: PL/pgSQL function inline_code_block line 8 at EXECUTE statement
|
||||
ERROR: query has no destination for result data in EXECUTE statement
|
||||
CONTEXT: PL/pgSQL function inline_code_block line 7 at EXECUTE statement
|
||||
drop table test;
|
||||
CREATE OR REPLACE PROCEDURE sp_test_1
|
||||
(
|
||||
@ -1123,7 +1138,7 @@ begin
|
||||
end;
|
||||
/
|
||||
select * from test;
|
||||
ID | NAME | ADD1
|
||||
id | name | add1
|
||||
----+-----------+-----------
|
||||
4 | july | henan
|
||||
6 | june | xian
|
||||
@ -1131,34 +1146,3 @@ select * from test;
|
||||
(3 rows)
|
||||
|
||||
drop table test;
|
||||
CREATE OR REPLACE PROCEDURE "SP_HW_SUB_ADDMODULES"
|
||||
(
|
||||
returncode OUT integer,
|
||||
PSV_MODULEDESC IN VARCHAR2
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
END SP_HW_SUB_ADDMODULES ;
|
||||
/
|
||||
create or replace PROCEDURE sp_test
|
||||
(
|
||||
temp IN varchar2
|
||||
)
|
||||
AS
|
||||
PSV_SQL VARCHAR2(200);
|
||||
BEGIN
|
||||
PSV_SQL := 'BEGIN '
|
||||
||'SP_HW_SUB_ADDMODULES('
|
||||
||':1,'
|
||||
||''''||to_char(TEMP)||''''
|
||||
||'); END;';
|
||||
dbms_output.put_line(PSV_SQL);
|
||||
EXECUTE IMMEDIATE PSV_SQL;
|
||||
END;
|
||||
/
|
||||
call sp_test('jack');
|
||||
BEGIN SP_HW_SUB_ADDMODULES(:1,'jack'); END;
|
||||
ERROR: the number of place holders doesn't match the number of parameters.
|
||||
CONTEXT: PL/pgSQL function SP_TEST(CHARACTER VARYING) line 9 at EXECUTE statement
|
||||
drop procedure SP_HW_SUB_ADDMODULES;
|
||||
drop procedure sp_test;
|
||||
|
||||
@ -26,7 +26,7 @@ SELECT PG_GET_VIEWDEF('VIEW_TEST1_P');
|
||||
SET ENABLE_SEQSCAN = FALSE;
|
||||
SET ENABLE_BITMAPSCAN = FALSE;
|
||||
EXPLAIN (COSTS off) SELECT * FROM TEST1_P WHERE TEST1_F1 > 5000;
|
||||
QUERY PLAN
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------
|
||||
Partition Iterator
|
||||
Iterations: 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -3119,10 +3119,35 @@ partition by range (Day)
|
||||
CREATE INDEX performance_select_index_index_000 ON fvt_data_partition_scan.performance_select_index_tbl_000(Day) LOCAL;
|
||||
SET ENABLE_SEQSCAN = FALSE;
|
||||
\! /data2/moyq/mppdb_svn/GAUSS200_OLAP_TRUNK/Code/src/test/regress/./tmp_check/install//data2/moyq/install/GAUSS200_OLAP_TRUNK/bin/gs_guc reload -D /data2/moyq/mppdb_svn/GAUSS200_OLAP_TRUNK/Code/src/test/regress/tmp_check/coordinator1 -Z coordinator -c "debug_print_plan=on" >/dev/null
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT * FROM fvt_data_partition_scan.PERFORMANCE_SELECT_INDEX_TBL_000 WHERE DAY =1 OR DAY =2 ;
|
||||
sh: /data2/moyq/mppdb_svn/GAUSS200_OLAP_TRUNK/Code/src/test/regress/./tmp_check/install//data2/moyq/install/GAUSS200_OLAP_TRUNK/bin/gs_guc: No such file or directory
|
||||
EXPLAIN (COSTS OFF) SELECT * FROM fvt_data_partition_scan.PERFORMANCE_SELECT_INDEX_TBL_000 WHERE DAY =1 OR DAY =2 ;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------
|
||||
Partition Iterator
|
||||
Iterations: 2
|
||||
-> Partitioned Bitmap Heap Scan on performance_select_index_tbl_000
|
||||
Recheck Cond: ((day = 1) OR (day = 2))
|
||||
Selected Partitions: 3..4
|
||||
-> BitmapOr
|
||||
-> Partitioned Bitmap Index Scan on performance_select_index_index_000
|
||||
Index Cond: (day = 1)
|
||||
Selected Partitions: 3..4
|
||||
-> Partitioned Bitmap Index Scan on performance_select_index_index_000
|
||||
Index Cond: (day = 2)
|
||||
Selected Partitions: 3..4
|
||||
(12 rows)
|
||||
|
||||
\! /data2/moyq/mppdb_svn/GAUSS200_OLAP_TRUNK/Code/src/test/regress/./tmp_check/install//data2/moyq/install/GAUSS200_OLAP_TRUNK/bin/gs_guc reload -D /data2/moyq/mppdb_svn/GAUSS200_OLAP_TRUNK/Code/src/test/regress/tmp_check/coordinator1 -Z coordinator -c "debug_print_plan=off" >/dev/null
|
||||
sh: /data2/moyq/mppdb_svn/GAUSS200_OLAP_TRUNK/Code/src/test/regress/./tmp_check/install//data2/moyq/install/GAUSS200_OLAP_TRUNK/bin/gs_guc: No such file or directory
|
||||
SELECT * FROM fvt_data_partition_scan.PERFORMANCE_SELECT_INDEX_TBL_000 WHERE DAY =1 OR DAY =2 ;
|
||||
starttime | starttimedstoffset | svrstarttime | stsvrdstoffset | endtime | endtimedstoffset | svrendtime | etsvrdstoffset | inserttime | timezoneoffset | objectno | granulityperiod | resultreliablityflag | day | counter_50331654 | counter_50331655 | counter_50331656 | counter_50331657 | counter_50331658 | counter_50331659 | counter_50331660 | counter_50331661 | counter_50331662 | counter_50331663 | counter_50331664 | counter_50331665 | counter_50331666 | counter_50331667 | counter_50331668 | counter_50331669 | counter_50331670 | counter_50331671 | counter_50331672 | counter_50331673 | counter_50331674 | counter_50331675 | counter_50331676 | counter_50331677 | counter_50331678 | counter_50331679
|
||||
-----------+--------------------+--------------+----------------+---------+------------------+------------+----------------+------------+----------------+----------+-----------------+----------------------+-----+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------
|
||||
(0 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF) SELECT COUNT(*) FROM fvt_data_partition_scan.PERFORMANCE_SELECT_INDEX_TBL_000 WHERE DAY =1 OR DAY =2 ;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Aggregate
|
||||
-> Partition Iterator
|
||||
Iterations: 2
|
||||
-> Partitioned Bitmap Heap Scan on performance_select_index_tbl_000
|
||||
@ -3131,32 +3156,10 @@ EXPLAIN (COSTS OFF, NODES OFF) SELECT * FROM fvt_data_partition_scan.PERFORMANCE
|
||||
-> BitmapOr
|
||||
-> Partitioned Bitmap Index Scan on performance_select_index_index_000
|
||||
Index Cond: (day = 1)
|
||||
Selected Partitions: 3..4
|
||||
-> Partitioned Bitmap Index Scan on performance_select_index_index_000
|
||||
Index Cond: (day = 2)
|
||||
(11 rows)
|
||||
|
||||
\! /data2/moyq/mppdb_svn/GAUSS200_OLAP_TRUNK/Code/src/test/regress/./tmp_check/install//data2/moyq/install/GAUSS200_OLAP_TRUNK/bin/gs_guc reload -D /data2/moyq/mppdb_svn/GAUSS200_OLAP_TRUNK/Code/src/test/regress/tmp_check/coordinator1 -Z coordinator -c "debug_print_plan=off" >/dev/null
|
||||
SELECT * FROM fvt_data_partition_scan.PERFORMANCE_SELECT_INDEX_TBL_000 WHERE DAY =1 OR DAY =2 ;
|
||||
starttime | starttimedstoffset | svrstarttime | stsvrdstoffset | endtime | endtimedstoffset | svrendtime | etsvrdstoffset | inserttime | timezoneoffset | objectno | granulityperiod | resultreliablityflag | day | counter_50331654 | counter_50331655 | counter_50331656 | counter_50331657 | counter_50331658 | counter_50331659 | counter_50331660 | counter_50331661 | counter_50331662 | counter_50331663 | counter_50331664 | counter_50331665 | counter_50331666 | counter_50331667 | counter_50331668 | counter_50331669 | counter_50331670 | counter_50331671 | counter_50331672 | counter_50331673 | counter_50331674 | counter_50331675 | counter_50331676 | counter_50331677 | counter_50331678 | counter_50331679
|
||||
-----------+--------------------+--------------+----------------+---------+------------------+------------+----------------+------------+----------------+----------+-----------------+----------------------+-----+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------
|
||||
(0 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT COUNT(*) FROM fvt_data_partition_scan.PERFORMANCE_SELECT_INDEX_TBL_000 WHERE DAY =1 OR DAY =2 ;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------------------------
|
||||
Aggregate
|
||||
-> Streaming (type: GATHER)
|
||||
-> Aggregate
|
||||
-> Partition Iterator
|
||||
Iterations: 2
|
||||
-> Partitioned Bitmap Heap Scan on performance_select_index_tbl_000
|
||||
Recheck Cond: ((day = 1) OR (day = 2))
|
||||
Selected Partitions: 3..4
|
||||
-> BitmapOr
|
||||
-> Partitioned Bitmap Index Scan on performance_select_index_index_000
|
||||
Index Cond: (day = 1)
|
||||
-> Partitioned Bitmap Index Scan on performance_select_index_index_000
|
||||
Index Cond: (day = 2)
|
||||
(13 rows)
|
||||
|
||||
SELECT COUNT(*) FROM fvt_data_partition_scan.PERFORMANCE_SELECT_INDEX_TBL_000 WHERE DAY =1 OR DAY =2 ;
|
||||
@ -3191,12 +3194,12 @@ SELECT * FROM TEST_TIDSCAN_PARTITION ORDER BY 1;
|
||||
START TRANSACTION;
|
||||
CURSOR CUR FOR SELECT SCORE FROM TEST_TIDSCAN_PARTITION WHERE SCORE > 0;
|
||||
MOVE CUR;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) UPDATE TEST_TIDSCAN_PARTITION SET SCORE =SCORE+1 WHERE CURRENT OF CUR;
|
||||
EXPLAIN (COSTS OFF) UPDATE TEST_TIDSCAN_PARTITION SET SCORE =SCORE+1 WHERE CURRENT OF CUR;
|
||||
ERROR: WHERE CURRENT OF clause not yet supported
|
||||
UPDATE TEST_TIDSCAN_PARTITION SET SCORE =SCORE+1 WHERE CURRENT OF CUR;
|
||||
--?ERROR: current transaction is aborted, commands ignored until end of transaction block.*
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block, firstChar[Q]
|
||||
CLOSE CUR;
|
||||
--?ERROR: current transaction is aborted, commands ignored until end of transaction block.*
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block, firstChar[Q]
|
||||
END;
|
||||
SELECT * FROM TEST_TIDSCAN_PARTITION ORDER BY 1;
|
||||
score
|
||||
@ -3211,12 +3214,12 @@ SELECT * FROM TEST_TIDSCAN_PARTITION ORDER BY 1;
|
||||
START TRANSACTION;
|
||||
CURSOR CUR FOR SELECT SCORE FROM TEST_TIDSCAN_PARTITION WHERE SCORE > 0;
|
||||
MOVE CUR;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) DELETE FROM TEST_TIDSCAN_PARTITION WHERE CURRENT OF CUR;
|
||||
EXPLAIN (COSTS OFF) DELETE FROM TEST_TIDSCAN_PARTITION WHERE CURRENT OF CUR;
|
||||
ERROR: WHERE CURRENT OF clause not yet supported
|
||||
DELETE FROM TEST_TIDSCAN_PARTITION WHERE CURRENT OF CUR;
|
||||
--?ERROR: current transaction is aborted, commands ignored until end of transaction block.*
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block, firstChar[Q]
|
||||
CLOSE CUR;
|
||||
--?ERROR: current transaction is aborted, commands ignored until end of transaction block.*
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block, firstChar[Q]
|
||||
END;
|
||||
SELECT * FROM TEST_TIDSCAN_PARTITION ORDER BY 1;
|
||||
score
|
||||
@ -3370,11 +3373,20 @@ PARTITION BY RANGE (C_ID)
|
||||
PARTITION UPDATE_PARTITION_PICT_TABLE_059_7 VALUES LESS THAN (4000)
|
||||
)
|
||||
ENABLE ROW MOVEMENT;
|
||||
ERROR: Un-support feature
|
||||
DETAIL: The distributed capability is not supported currently.
|
||||
CREATE INDEX UPDATE_PARTITION_PICT_TABLE_059_INDEX_001 ON fvt_data_partition_scan.UPDATE_PARTITION_PICT_TABLE_059(C_ID) LOCAL;
|
||||
ERROR: relation "fvt_data_partition_scan.update_partition_pict_table_059" does not exist
|
||||
CREATE INDEX UPDATE_PARTITION_PICT_TABLE_059_INDEX_002 ON fvt_data_partition_scan.UPDATE_PARTITION_PICT_TABLE_059(C_ID) LOCAL;
|
||||
ERROR: relation "fvt_data_partition_scan.update_partition_pict_table_059" does not exist
|
||||
CREATE INDEX UPDATE_PARTITION_PICT_TABLE_059_INDEX_003 ON fvt_data_partition_scan.UPDATE_PARTITION_PICT_TABLE_059(C_ID , C_D_ID) LOCAL;
|
||||
ERROR: relation "fvt_data_partition_scan.update_partition_pict_table_059" does not exist
|
||||
CREATE INDEX UPDATE_PARTITION_PICT_TABLE_059_INDEX_004 ON fvt_data_partition_scan.UPDATE_PARTITION_PICT_TABLE_059(C_D_ID) LOCAL;
|
||||
ERROR: relation "fvt_data_partition_scan.update_partition_pict_table_059" does not exist
|
||||
INSERT INTO fvt_data_partition_scan.UPDATE_PARTITION_PICT_TABLE_059 SELECT C_ID , C_D_ID , C_W_ID , C_FIRST , C_MIDDLE , C_LAST , C_STREET_1 , C_STREET_2 , C_CITY FROM TPCC.CUSTOMER WHERE C_ID<2000 AND C_D_ID=6 AND C_W_ID =3;
|
||||
ERROR: relation "fvt_data_partition_scan.update_partition_pict_table_059" does not exist on datanode1
|
||||
LINE 1: INSERT INTO fvt_data_partition_scan.UPDATE_PARTITION_PICT_T...
|
||||
^
|
||||
UPDATE fvt_data_partition_scan.UPDATE_PARTITION_PICT_TABLE_059 UPDATE_059 SET
|
||||
UPDATE_059.C_ID=UPDATE_059.C_ID+2000,
|
||||
UPDATE_059.C_D_ID=FROM_DD.D_ID+WITH_CC.W_ID,
|
||||
@ -3383,18 +3395,18 @@ UPDATE fvt_data_partition_scan.UPDATE_PARTITION_PICT_TABLE_059 UPDATE_059 SET
|
||||
(C_STREET_1 , C_STREET_2 , C_CITY )=(SELECT W_STREET_1 , W_STREET_2 , W_CITY FROM TPCC.WAREHOUSE WHERE W_ID=8)
|
||||
FROM fvt_data_partition_scan.UPDATE_PARTITION_PICT_TABLE_FROM_000 FROM_DD , fvt_data_partition_scan.WITH_UPDATE_TABLE_001 WITH_CC
|
||||
WHERE UPDATE_059.C_ID BETWEEN (SELECT W_ID*80 FROM TPCC.WAREHOUSE WHERE W_ID=10 ) AND 1000;
|
||||
ERROR: Distributed key column can't be updated in current version
|
||||
ERROR: relation "fvt_data_partition_scan.update_partition_pict_table_059" does not exist on datanode1
|
||||
LINE 1: UPDATE fvt_data_partition_scan.UPDATE_PARTITION_PICT_TABLE_...
|
||||
^
|
||||
SELECT C_ID , C_D_ID , C_W_ID , C_FIRST , C_MIDDLE , C_LAST , C_STREET_1 , C_STREET_2 , C_CITY FROM fvt_data_partition_scan.UPDATE_PARTITION_PICT_TABLE_059 ORDER BY C_ID , C_D_ID , C_W_ID , C_FIRST , C_MIDDLE;
|
||||
c_id | c_d_id | c_w_id | c_first | c_middle | c_last | c_street_1 | c_street_2 | c_city
|
||||
------+--------+--------+---------+----------+--------+------------+------------+--------
|
||||
(0 rows)
|
||||
|
||||
ERROR: relation "fvt_data_partition_scan.update_partition_pict_table_059" does not exist on datanode1
|
||||
LINE 1: ..., C_LAST , C_STREET_1 , C_STREET_2 , C_CITY FROM fvt_data_p...
|
||||
^
|
||||
-- Clean up
|
||||
DROP SCHEMA fvt_data_partition_scan CASCADE;
|
||||
NOTICE: drop cascades to 3 other objects
|
||||
NOTICE: drop cascades to 2 other objects
|
||||
DETAIL: drop cascades to table fvt_data_partition_scan.update_partition_pict_table_from_000
|
||||
drop cascades to table fvt_data_partition_scan.with_update_table_001
|
||||
drop cascades to table fvt_data_partition_scan.update_partition_pict_table_059
|
||||
DROP SCHEMA TPCC CASCADE;
|
||||
NOTICE: drop cascades to 2 other objects
|
||||
DETAIL: drop cascades to table tpcc.customer
|
||||
@ -3410,22 +3422,33 @@ PARTITION BY RANGE (a)
|
||||
PARTITION p1 VALUES LESS THAN (200),
|
||||
PARTITION p2 VALUES LESS THAN (300)
|
||||
);
|
||||
ERROR: Un-support feature
|
||||
DETAIL: The distributed capability is not supported currently.
|
||||
COPY hw_partition_scan_tenk3 (a, b) FROM stdin;
|
||||
ERROR: relation "hw_partition_scan_tenk3" does not exist
|
||||
10 2015-04-25 18:41:30.483823
|
||||
20 2015-04-25 18:41:30.489231
|
||||
30 2015-04-30 18:41:30.482444
|
||||
40 2015-04-22 18:41:30.487192
|
||||
50 2015-04-27 18:41:30.48514
|
||||
60 2015-04-22 18:41:30.480243
|
||||
\.
|
||||
invalid command \.
|
||||
;
|
||||
ERROR: syntax error at or near "10"
|
||||
LINE 1: 10 2015-04-25 18:41:30.483823
|
||||
^
|
||||
CREATE INDEX hw_partition_scan_tenk3_idx_1 ON hw_partition_scan_tenk3 USING btree (b) LOCAL(PARTITION p0_b_idx, PARTITION p1_b_idx, PARTITION p2_b_idx) ;
|
||||
ERROR: relation "hw_partition_scan_tenk3" does not exist
|
||||
ANALYZE hw_partition_scan_tenk3;
|
||||
ERROR: relation "hw_partition_scan_tenk3" does not exist
|
||||
SET ENABLE_FAST_QUERY_SHIPPING = OFF;
|
||||
ERROR: unrecognized configuration parameter "enable_fast_query_shipping"
|
||||
SET ENABLE_SEQSCAN = OFF;
|
||||
SET ENABLE_INDEXSCAN = OFF;
|
||||
SELECT * FROM HW_PARTITION_SCAN_TENK3 WHERE B > TO_DATE('2015-04-22 00:00:00','YYYY-MM-DD HH24:MI:SS') ORDER BY 1;
|
||||
a | b
|
||||
----+---------------------------------
|
||||
10 | Sat Apr 25 18:41:30.483823 2015
|
||||
20 | Sat Apr 25 18:41:30.489231 2015
|
||||
30 | Thu Apr 30 18:41:30.482444 2015
|
||||
40 | Wed Apr 22 18:41:30.487192 2015
|
||||
50 | Mon Apr 27 18:41:30.48514 2015
|
||||
60 | Wed Apr 22 18:41:30.480243 2015
|
||||
(6 rows)
|
||||
|
||||
ERROR: relation "hw_partition_scan_tenk3" does not exist on datanode1
|
||||
LINE 1: SELECT * FROM HW_PARTITION_SCAN_TENK3 WHERE B > TO_DATE('201...
|
||||
^
|
||||
DROP TABLE HW_PARTITION_SCAN_TENK3;
|
||||
ERROR: table "hw_partition_scan_tenk3" does not exist
|
||||
|
||||
@ -34,10 +34,12 @@ ERROR: inserted partition key does not map to any table partition
|
||||
insert into test_partition_for_null_range values (0, null, null, null);
|
||||
-- failed: The partition number is invalid or out-of-range
|
||||
select * from test_partition_for_null_range partition for (null, null) order by 1, 2, 3, 4;
|
||||
ERROR: The partition number is invalid or out-of-range
|
||||
ERROR: Cannot find partition by the value
|
||||
DETAIL: N/A.
|
||||
-- failed: The partition number is invalid or out-of-range
|
||||
select * from test_partition_for_null_range partition for (null, 0) order by 1, 2, 3, 4;
|
||||
ERROR: The partition number is invalid or out-of-range
|
||||
ERROR: Cannot find partition by the value
|
||||
DETAIL: N/A.
|
||||
-- success
|
||||
select * from test_partition_for_null_range partition for (0, null) order by 1, 2, 3, 4;
|
||||
a | b | c | d
|
||||
@ -99,7 +101,8 @@ ERROR: inserted partition key does not map to any table partition
|
||||
insert into test_partition_for_null_interval values (0, null);
|
||||
-- failed: The partition number is invalid or out-of-range
|
||||
select * from test_partition_for_null_interval partition for (null) order by 1, 2;
|
||||
ERROR: The partition number is invalid or out-of-range
|
||||
ERROR: Cannot find partition by the value
|
||||
DETAIL: N/A.
|
||||
-- failed: The partition number is invalid or out-of-range
|
||||
alter table test_partition_for_null_interval rename partition for (null) to test_partition_for_null_interval_part1;
|
||||
ERROR: The partition number is invalid or out-of-range
|
||||
@ -128,10 +131,12 @@ ERROR: inserted partition key does not map to any table partition
|
||||
insert into test_partition_for_null_range_text values ('A', null, null, null);
|
||||
-- failed: The partition number is invalid or out-of-range
|
||||
select * from test_partition_for_null_range_text partition for (null, null) order by 1, 2, 3, 4;
|
||||
ERROR: The partition number is invalid or out-of-range
|
||||
ERROR: Cannot find partition by the value
|
||||
DETAIL: N/A.
|
||||
-- failed: The partition number is invalid or out-of-range
|
||||
select * from test_partition_for_null_range_text partition for (null, 'A') order by 1, 2, 3, 4;
|
||||
ERROR: The partition number is invalid or out-of-range
|
||||
ERROR: Cannot find partition by the value
|
||||
DETAIL: N/A.
|
||||
-- success
|
||||
select * from test_partition_for_null_range_text partition for ('A', null) order by 1, 2, 3, 4;
|
||||
a | b | c | d
|
||||
@ -194,10 +199,12 @@ ERROR: inserted partition key does not map to any table partition
|
||||
insert into test_partition_for_null_range_timestamp values ('2000-01-01 01:01:01', null, null, null);
|
||||
-- failed: The partition number is invalid or out-of-range
|
||||
select * from test_partition_for_null_range_timestamp partition for (null, null) order by 1, 2, 3, 4;
|
||||
ERROR: The partition number is invalid or out-of-range
|
||||
ERROR: Cannot find partition by the value
|
||||
DETAIL: N/A.
|
||||
-- failed: The partition number is invalid or out-of-range
|
||||
select * from test_partition_for_null_range_timestamp partition for (null, '2000-01-01 01:01:01+01') order by 1, 2, 3, 4;
|
||||
ERROR: The partition number is invalid or out-of-range
|
||||
ERROR: Cannot find partition by the value
|
||||
DETAIL: N/A.
|
||||
-- success
|
||||
select * from test_partition_for_null_range_timestamp partition for ('2000-01-01 01:01:01', null) order by 1, 2, 3, 4;
|
||||
a | b | c | d
|
||||
@ -257,7 +264,8 @@ ERROR: inserted partition key does not map to any table partition
|
||||
insert into test_partition_for_null_interval_timestamp values ('2000-01-01 00:00:00', null);
|
||||
-- failed: The partition number is invalid or out-of-range
|
||||
select * from test_partition_for_null_interval_timestamp partition for (null) order by 1, 2;
|
||||
ERROR: The partition number is invalid or out-of-range
|
||||
ERROR: Cannot find partition by the value
|
||||
DETAIL: N/A.
|
||||
-- failed: The partition number is invalid or out-of-range
|
||||
alter table test_partition_for_null_interval_timestamp rename partition for (null) to test_partition_for_null_interval_timestamp_part1;
|
||||
ERROR: The partition number is invalid or out-of-range
|
||||
@ -367,10 +375,12 @@ ERROR: inserted partition key does not map to any table partition
|
||||
insert into test_partition_for_null_range_and_maxvalue_2 values (0, null, null, null);
|
||||
-- failed: The partition number is invalid or out-of-range
|
||||
select * from test_partition_for_null_range_and_maxvalue_2 partition for (null, null) order by 1, 2, 3, 4;
|
||||
ERROR: The partition number is invalid or out-of-range
|
||||
ERROR: Cannot find partition by the value
|
||||
DETAIL: N/A.
|
||||
-- failed: The partition number is invalid or out-of-range
|
||||
select * from test_partition_for_null_range_and_maxvalue_2 partition for (null, 0) order by 1, 2, 3, 4;
|
||||
ERROR: The partition number is invalid or out-of-range
|
||||
ERROR: Cannot find partition by the value
|
||||
DETAIL: N/A.
|
||||
-- success: select partition p1
|
||||
select * from test_partition_for_null_range_and_maxvalue_2 partition for (0, null) order by 1, 2, 3, 4;
|
||||
a | b | c | d
|
||||
@ -443,7 +453,8 @@ INSERT INTO select_partition_table_000_3 VALUES('I','IJK','IJKLMNO','i','ijk','i
|
||||
INSERT INTO select_partition_table_000_3 VALUES('I','IJK','IJKLMNO','i','ijk','ijklmno',1100,999999,99,9.9,9.99,9.999,'2000-09-09','2000-09-09 09:09:09','2000-09-09 09:09:09+09');
|
||||
INSERT INTO select_partition_table_000_3 VALUES('I','IJK','IJKLMNO','i','ijk','ijklmno',1600,999999,99,9.9,9.99,9.999,'2000-09-09','2000-09-09 09:09:09','2000-09-09 09:09:09+09');
|
||||
select * from select_partition_table_000_3 partition for (NULL) order by C_INT;
|
||||
ERROR: The partition number is invalid or out-of-range
|
||||
ERROR: Cannot find partition by the value
|
||||
DETAIL: N/A.
|
||||
alter table select_partition_table_000_3 rename partition for (NULL) to select_partition_table_000_3_p1;
|
||||
ERROR: The partition number is invalid or out-of-range
|
||||
alter table select_partition_table_000_3 drop partition for (NULL);
|
||||
@ -486,7 +497,8 @@ INSERT INTO select_partition_table_000_4 VALUES('I','IJK','IJKLMNO','i','ijk','i
|
||||
INSERT INTO select_partition_table_000_4 VALUES('J','IJK','IJKLMNO','j','jkl','jklmnop',1111,111111,111,11.1,11.11,11.111,'2000-09-09','2000-10-02 09:09:09','2000-10-02 09:09:09+09');
|
||||
INSERT INTO select_partition_table_000_4 VALUES('K','JKl','IJKLMNO','j','jkl','jklmnop',1111,111111,111,11.1,11.11,11.111,'2000-09-09','2000-10-06 09:09:09','2000-10-06 09:09:09+09');
|
||||
select C_INT,C_TS_WITHOUT from select_partition_table_000_4 partition for (null) order by 1, 2;
|
||||
ERROR: The partition number is invalid or out-of-range
|
||||
ERROR: Cannot find partition by the value
|
||||
DETAIL: N/A.
|
||||
alter table select_partition_table_000_4 rename partition for (null) to select_partition_table_000_4_p1;
|
||||
ERROR: The partition number is invalid or out-of-range
|
||||
alter table select_partition_table_000_4 drop partition for (null);
|
||||
@ -25202,20 +25214,7 @@ PARTITION BY RANGE (A)
|
||||
PARTITION HW_PARTITION_SELECT_RT_P3 VALUES LESS THAN (7)
|
||||
);
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT B FROM (SELECT B FROM HW_PARTITION_SELECT_RT LIMIT 100) ORDER BY B;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
-> Sort
|
||||
Sort Key: hw_partition_select_rt.b
|
||||
-> Limit
|
||||
-> Streaming(type: BROADCAST)
|
||||
-> Limit
|
||||
-> Partition Iterator
|
||||
Iterations: 3
|
||||
-> Partitioned Seq Scan on hw_partition_select_rt
|
||||
Selected Partitions: 1..3
|
||||
(10 rows)
|
||||
|
||||
ERROR: unrecognized EXPLAIN option "nodes"
|
||||
--CREATE TABLE HW_PARTITION_SELECT_PTEST(A INT, B INT)
|
||||
--PARTITION BY RANGE(A)
|
||||
--INTERVAL(1000)
|
||||
@ -25253,7 +25252,8 @@ partition by range (C_CHAR_3)
|
||||
partition RANGE_PARTITION_000_1 values less than ('DDDDD'),
|
||||
partition RANGE_PARTITION_000_2 values less than ('ZZZZZ')
|
||||
);
|
||||
ERROR: relation "hw_partition_select_rangetab" already exists
|
||||
ERROR: relation "hw_partition_select_rangetab" already exists in schema "fvt_compress_qwer"
|
||||
DETAIL: creating new table with existing name in the same schema
|
||||
select * from hw_partition_select_rangetab where length(C_CHAR_3)>5 order by 1, 2;
|
||||
c_char_3 | c_int
|
||||
----------+-------
|
||||
@ -25296,33 +25296,24 @@ INSERT INTO select_partition_table_000_2 VALUES('I','IJK','IJKLMNO','i','ijk','i
|
||||
create index select_partition_table_index_000_2 ON select_partition_table_000_2(C_CHAR_3,C_VARCHAR_3,C_INT,C_TS_WITHOUT) local(PARTITION select_partition_000_2_1, PARTITION select_partition_000_2_3);
|
||||
create view select_partition_table_view_000_2 as select * from select_partition_table_000_2;
|
||||
explain (costs off, verbose on) select lower(C_CHAR_3), initcap(C_VARCHAR_3), sqrt(C_INT), C_NUMERIC- 1 + 2*6/3, rank() over w from select_partition_table_000_2 where C_INT > 600 or C_BIGINT < 444444 window w as (partition by C_TS_WITHOUT) order by 1,2,3,4,5;
|
||||
WARNING: Statistics in some tables or columns(fvt_compress_qwer.select_partition_table_000_2.c_char_1, fvt_compress_qwer.select_partition_table_000_2.c_int, fvt_compress_qwer.select_partition_table_000_2.c_bigint, fvt_compress_qwer.select_partition_table_000_2.c_ts_without) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Output: (lower((c_char_3)::text)), (initcap((c_varchar_3)::text)), (sqrt((c_int)::double precision)), ((((c_numeric - 1::numeric))::double precision + 4::double precision)), (rank() OVER (PARTITION BY c_ts_without)), c_ts_without
|
||||
Merge Sort Key: (lower((select_partition_table_000_2.c_char_3)::text)), (initcap((select_partition_table_000_2.c_varchar_3)::text)), (sqrt((select_partition_table_000_2.c_int)::double precision)), ((((select_partition_table_000_2.c_numeric - 1::numeric))::double precision + 4::double precision)), (rank() OVER (PARTITION BY select_partition_table_000_2.c_ts_without))
|
||||
-> Sort
|
||||
Output: (lower((c_char_3)::text)), (initcap((c_varchar_3)::text)), (sqrt((c_int)::double precision)), ((((c_numeric - 1::numeric))::double precision + 4::double precision)), (rank() OVER (PARTITION BY c_ts_without)), c_ts_without
|
||||
Sort Key: (lower((select_partition_table_000_2.c_char_3)::text)), (initcap((select_partition_table_000_2.c_varchar_3)::text)), (sqrt((select_partition_table_000_2.c_int)::double precision)), ((((select_partition_table_000_2.c_numeric - 1::numeric))::double precision + 4::double precision)), (rank() OVER (PARTITION BY select_partition_table_000_2.c_ts_without))
|
||||
-> WindowAgg
|
||||
Output: lower((c_char_3)::text), initcap((c_varchar_3)::text), sqrt((c_int)::double precision), (((c_numeric - 1::numeric))::double precision + 4::double precision), rank() OVER (PARTITION BY c_ts_without), c_ts_without
|
||||
-> Sort
|
||||
Sort Key: (lower((select_partition_table_000_2.c_char_3)::text)), (initcap((select_partition_table_000_2.c_varchar_3)::text)), (sqrt((select_partition_table_000_2.c_int)::double precision)), ((((select_partition_table_000_2.c_numeric - 1::numeric))::double precision + 4::double precision)), (rank() OVER (PARTITION BY select_partition_table_000_2.c_ts_without))
|
||||
-> WindowAgg
|
||||
Output: lower((c_char_3)::text), initcap((c_varchar_3)::text), sqrt((c_int)::double precision), (((c_numeric - 1::numeric))::double precision + 4::double precision), rank() OVER (PARTITION BY c_ts_without), c_ts_without
|
||||
-> Sort
|
||||
Output: c_ts_without, c_char_3, c_varchar_3, c_int, c_numeric
|
||||
Sort Key: select_partition_table_000_2.c_ts_without
|
||||
-> Partition Iterator
|
||||
Output: c_ts_without, c_char_3, c_varchar_3, c_int, c_numeric
|
||||
Sort Key: select_partition_table_000_2.c_ts_without
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
Iterations: 2
|
||||
-> Partitioned Seq Scan on fvt_compress_qwer.select_partition_table_000_2
|
||||
Output: c_ts_without, c_char_3, c_varchar_3, c_int, c_numeric
|
||||
Distribute Key: c_ts_without
|
||||
-> Partition Iterator
|
||||
Output: c_ts_without, c_char_3, c_varchar_3, c_int, c_numeric
|
||||
Iterations: 2
|
||||
-> Partitioned Seq Scan on fvt_compress_qwer.select_partition_table_000_2
|
||||
Output: c_ts_without, c_char_3, c_varchar_3, c_int, c_numeric
|
||||
Distribute Key: c_char_1
|
||||
Filter: ((select_partition_table_000_2.c_int > 600) OR (select_partition_table_000_2.c_bigint < 444444))
|
||||
Selected Partitions: 1..2
|
||||
(22 rows)
|
||||
Filter: ((select_partition_table_000_2.c_int > 600) OR (select_partition_table_000_2.c_bigint < 444444))
|
||||
Selected Partitions: 1..2
|
||||
(15 rows)
|
||||
|
||||
select lower(C_CHAR_3), initcap(C_VARCHAR_3), sqrt(C_INT), C_NUMERIC- 1 + 2*6/3, rank() over w from select_partition_table_000_2 where C_INT > 600 or C_BIGINT < 444444 window w as (partition by C_TS_WITHOUT) order by 1,2,3,4,5;
|
||||
lower | initcap | sqrt | ?column? | rank
|
||||
@ -25360,11 +25351,13 @@ CREATE TABLE select_partition_table_000_3(
|
||||
partition select_partition_000_3_1 values less than (500),
|
||||
partition select_partition_000_3_3 values less than (2000)
|
||||
);
|
||||
ERROR: relation "select_partition_table_000_3" already exists
|
||||
ERROR: relation "select_partition_table_000_3" already exists in schema "fvt_compress_qwer"
|
||||
DETAIL: creating new table with existing name in the same schema
|
||||
create index select_partition_table_index_000_3 ON select_partition_table_000_3(C_CHAR_3,C_VARCHAR_3,C_INT,C_TS_WITHOUT) local(partition select_partition_000_3_1, partition select_partition_000_3_3);
|
||||
ERROR: relation "select_partition_table_index_000_3" already exists
|
||||
create view select_partition_table_view_000_3 as select * from select_partition_table_000_3;
|
||||
ERROR: relation "select_partition_table_view_000_3" already exists
|
||||
ERROR: relation "select_partition_table_view_000_3" already exists in schema "fvt_compress_qwer"
|
||||
DETAIL: creating new table with existing name in the same schema
|
||||
INSERT INTO select_partition_table_000_3 VALUES('A','ABC','ABCDEFG','a','abc','abcdefg',111,111111,11,1.1,1.11,1.111,'2000-01-01','2000-01-01 01:01:01','2000-01-01 01:01:01+01');
|
||||
INSERT INTO select_partition_table_000_3 VALUES('B','BCD','BCDEFGH','b','bcd','bcdefgh',222,222222,22,2.2,2.22,2.222,'2000-02-02','2000-02-02 02:02:02','2000-02-02 02:02:02+02');
|
||||
INSERT INTO select_partition_table_000_3 VALUES('C','CDE','CDEFGHI','c','cde','cdefghi',333,333333,33,3.3,3.33,3.333,'2000-03-03','2000-03-03 03:03:03','2000-03-03 03:03:03+03');
|
||||
@ -25379,33 +25372,24 @@ INSERT INTO select_partition_table_000_3 VALUES('I','IJK','IJKLMNO','i','ijk','i
|
||||
INSERT INTO select_partition_table_000_3 VALUES('I','IJK','IJKLMNO','i','ijk','ijklmno',1100,999999,99,9.9,9.99,9.999,'2000-09-09','2000-09-09 09:09:09','2000-09-09 09:09:09+09');
|
||||
INSERT INTO select_partition_table_000_3 VALUES('I','IJK','IJKLMNO','i','ijk','ijklmno',1600,999999,99,9.9,9.99,9.999,'2000-09-09','2000-09-09 09:09:09','2000-09-09 09:09:09+09');
|
||||
explain (costs off, verbose on) select lower(C_CHAR_3), initcap(C_VARCHAR_3), sqrt(C_INT), C_NUMERIC- 1 + 2*6/3, rank() over w from select_partition_table_000_3 where C_INT > 600 or C_BIGINT < 444444 window w as (partition by C_TS_WITHOUT) order by 1,2,3,4,5;
|
||||
WARNING: Statistics in some tables or columns(fvt_compress_qwer.select_partition_table_000_3.c_char_1, fvt_compress_qwer.select_partition_table_000_3.c_int, fvt_compress_qwer.select_partition_table_000_3.c_bigint, fvt_compress_qwer.select_partition_table_000_3.c_ts_without) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Output: (lower((c_char_3)::text)), (initcap((c_varchar_3)::text)), (sqrt((c_int)::double precision)), ((((c_numeric - 1::numeric))::double precision + 4::double precision)), (rank() OVER (PARTITION BY c_ts_without)), c_ts_without
|
||||
Merge Sort Key: (lower((select_partition_table_000_3.c_char_3)::text)), (initcap((select_partition_table_000_3.c_varchar_3)::text)), (sqrt((select_partition_table_000_3.c_int)::double precision)), ((((select_partition_table_000_3.c_numeric - 1::numeric))::double precision + 4::double precision)), (rank() OVER (PARTITION BY select_partition_table_000_3.c_ts_without))
|
||||
-> Sort
|
||||
Output: (lower((c_char_3)::text)), (initcap((c_varchar_3)::text)), (sqrt((c_int)::double precision)), ((((c_numeric - 1::numeric))::double precision + 4::double precision)), (rank() OVER (PARTITION BY c_ts_without)), c_ts_without
|
||||
Sort Key: (lower((select_partition_table_000_3.c_char_3)::text)), (initcap((select_partition_table_000_3.c_varchar_3)::text)), (sqrt((select_partition_table_000_3.c_int)::double precision)), ((((select_partition_table_000_3.c_numeric - 1::numeric))::double precision + 4::double precision)), (rank() OVER (PARTITION BY select_partition_table_000_3.c_ts_without))
|
||||
-> WindowAgg
|
||||
Output: lower((c_char_3)::text), initcap((c_varchar_3)::text), sqrt((c_int)::double precision), (((c_numeric - 1::numeric))::double precision + 4::double precision), rank() OVER (PARTITION BY c_ts_without), c_ts_without
|
||||
-> Sort
|
||||
Sort Key: (lower((select_partition_table_000_3.c_char_3)::text)), (initcap((select_partition_table_000_3.c_varchar_3)::text)), (sqrt((select_partition_table_000_3.c_int)::double precision)), ((((select_partition_table_000_3.c_numeric - 1::numeric))::double precision + 4::double precision)), (rank() OVER (PARTITION BY select_partition_table_000_3.c_ts_without))
|
||||
-> WindowAgg
|
||||
Output: lower((c_char_3)::text), initcap((c_varchar_3)::text), sqrt((c_int)::double precision), (((c_numeric - 1::numeric))::double precision + 4::double precision), rank() OVER (PARTITION BY c_ts_without), c_ts_without
|
||||
-> Sort
|
||||
Output: c_ts_without, c_char_3, c_varchar_3, c_int, c_numeric
|
||||
Sort Key: select_partition_table_000_3.c_ts_without
|
||||
-> Partition Iterator
|
||||
Output: c_ts_without, c_char_3, c_varchar_3, c_int, c_numeric
|
||||
Sort Key: select_partition_table_000_3.c_ts_without
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
Iterations: 2
|
||||
-> Partitioned Seq Scan on fvt_compress_qwer.select_partition_table_000_3
|
||||
Output: c_ts_without, c_char_3, c_varchar_3, c_int, c_numeric
|
||||
Distribute Key: c_ts_without
|
||||
-> Partition Iterator
|
||||
Output: c_ts_without, c_char_3, c_varchar_3, c_int, c_numeric
|
||||
Iterations: 2
|
||||
-> Partitioned Seq Scan on fvt_compress_qwer.select_partition_table_000_3
|
||||
Output: c_ts_without, c_char_3, c_varchar_3, c_int, c_numeric
|
||||
Distribute Key: c_char_1
|
||||
Filter: ((select_partition_table_000_3.c_int > 600) OR (select_partition_table_000_3.c_bigint < 444444))
|
||||
Selected Partitions: 1..2
|
||||
(22 rows)
|
||||
Filter: ((select_partition_table_000_3.c_int > 600) OR (select_partition_table_000_3.c_bigint < 444444))
|
||||
Selected Partitions: 1..2
|
||||
(15 rows)
|
||||
|
||||
select lower(C_CHAR_3), initcap(C_VARCHAR_3), sqrt(C_INT), C_NUMERIC- 1 + 2*6/3, rank() over w from select_partition_table_000_3 where C_INT > 600 or C_BIGINT < 444444 window w as (partition by C_TS_WITHOUT) order by 1,2,3,4,5;
|
||||
lower | initcap | sqrt | ?column? | rank
|
||||
|
||||
@ -161,7 +161,7 @@ ALTER INDEX idx1_table_unusable_index_exchange REBUILD;
|
||||
ALTER INDEX idx1_partition_unsable_index_3 UNUSABLE;
|
||||
ALTER TABLE partition_unsable_index_3 EXCHANGE PARTITION (p1_partition_unsable_index_3)
|
||||
WITH TABLE table_unusable_index_exchange;
|
||||
ERROR: index mismatch for tables in ALTER TABLE EXCHANGE PARTITION
|
||||
ERROR: tables in ALTER TABLE EXCHANGE PARTITION must have the same number of indexs
|
||||
ALTER INDEX idx1_partition_unsable_index_3 REBUILD;
|
||||
-- modify one index partition unusable
|
||||
-- exchange failed due to unusable index partition
|
||||
|
||||
@ -61,7 +61,7 @@ select relname, relpages >0 as relpagesgtzero, reltuples >0 as reltuplesgtzero f
|
||||
-------------------------------------+----------------+-----------------
|
||||
hw_partition_vacuum_partition_table | t | t
|
||||
inx_btree_id | t | t
|
||||
inx_hash_id | t | t
|
||||
inx_hash_id | f | f
|
||||
(3 rows)
|
||||
|
||||
--i9. vacuum index
|
||||
@ -73,7 +73,7 @@ select relname, relpages >0 as relpagesgtzero, reltuples >0 as reltuplesgtzero f
|
||||
-------------------------------------+----------------+-----------------
|
||||
hw_partition_vacuum_partition_table | t | t
|
||||
inx_btree_id | t | t
|
||||
inx_hash_id | t | t
|
||||
inx_hash_id | f | f
|
||||
(3 rows)
|
||||
|
||||
--i11. delete all the tuples
|
||||
@ -94,9 +94,9 @@ vacuum;
|
||||
select relname, relpages >0 as relpagesgtzero, reltuples >0 as reltuplesgtzero from pg_class where relname='hw_partition_vacuum_partition_table' or relname='inx_btree_id' or relname='inx_hash_id' order by 1;
|
||||
relname | relpagesgtzero | reltuplesgtzero
|
||||
-------------------------------------+----------------+-----------------
|
||||
hw_partition_vacuum_partition_table | f | f
|
||||
inx_btree_id | t | f
|
||||
inx_hash_id | t | f
|
||||
hw_partition_vacuum_partition_table | t | t
|
||||
inx_btree_id | t | t
|
||||
inx_hash_id | f | f
|
||||
(3 rows)
|
||||
|
||||
--i14. selete table
|
||||
|
||||
@ -44,7 +44,7 @@ vacuum full hw_partition_vacuum_full_partition_table partition(hw_partition_vacu
|
||||
select relpages, reltuples from pg_partition where relname='hw_partition_vacuum_full_partition_table_p1';
|
||||
relpages | reltuples
|
||||
----------+-----------
|
||||
0 | 0
|
||||
7 | 999
|
||||
(1 row)
|
||||
|
||||
select relpages > 0 as relpagesgtzero, reltuples > 0 as reltuplesgtzero from pg_class where relname='hw_partition_vacuum_full_partition_table';
|
||||
@ -65,7 +65,7 @@ vacuum full hw_partition_vacuum_full_partition_table partition(hw_partition_vacu
|
||||
select relpages, reltuples from pg_partition where relname='hw_partition_vacuum_full_partition_table_p2';
|
||||
relpages | reltuples
|
||||
----------+-----------
|
||||
0 | 0
|
||||
7 | 999
|
||||
(1 row)
|
||||
|
||||
select relpages > 0 as relpagesgtzero, reltuples > 0 as reltuplesgtzero from pg_class where relname='hw_partition_vacuum_full_partition_table';
|
||||
@ -81,7 +81,7 @@ vacuum full hw_partition_vacuum_full_partition_table;
|
||||
select relpages > 0 as relpagesgtzero, reltuples > 0 as reltuplesgtzero from pg_class where relname='hw_partition_vacuum_full_partition_table';
|
||||
relpagesgtzero | reltuplesgtzero
|
||||
----------------+-----------------
|
||||
f | f
|
||||
t | t
|
||||
(1 row)
|
||||
|
||||
select * from hw_partition_vacuum_full_partition_table order by 1, 2, 3;
|
||||
|
||||
@ -2309,30 +2309,24 @@ explain (costs off, verbose on) select t.b, sum(cc) + sum(cc) from (select b, co
|
||||
------------------------------------------------------------------------------------
|
||||
-- basic with as
|
||||
explain (costs off, verbose on) with s as (select b, sum(c) as cc from t1 group by b) select t.b, sum(cc) from s, t where s.b=t.b group by t.b order by 1,2;
|
||||
QUERY PLAN
|
||||
------------------------------------------------
|
||||
QUERY PLAN
|
||||
----------------------------------------------------
|
||||
Sort
|
||||
Output: t.b, (sum(s.cc))
|
||||
Sort Key: t.b, (sum(s.cc))
|
||||
CTE s
|
||||
-> HashAggregate
|
||||
Output: t1.b, sum(t1.c)
|
||||
Group By Key: t1.b
|
||||
-> Seq Scan on lazyagg.t1
|
||||
Output: t1.b, t1.c
|
||||
Output: t.b, (sum((t1.c)::bigint))
|
||||
Sort Key: t.b, (sum((t1.c)::bigint))
|
||||
-> HashAggregate
|
||||
Output: t.b, sum(s.cc)
|
||||
Output: t.b, sum((t1.c)::bigint)
|
||||
Group By Key: t.b
|
||||
-> Hash Join
|
||||
Output: s.cc, t.b
|
||||
Hash Cond: (t.b = s.b)
|
||||
-> Seq Scan on lazyagg.t
|
||||
Output: t.a, t.b, t.c, t.d
|
||||
Output: t1.c, t.b
|
||||
Hash Cond: (t1.b = t.b)
|
||||
-> Seq Scan on lazyagg.t1
|
||||
Output: t1.a, t1.b, t1.c, t1.d
|
||||
-> Hash
|
||||
Output: s.cc, s.b
|
||||
-> CTE Scan on s
|
||||
Output: s.cc, s.b
|
||||
(21 rows)
|
||||
Output: t.b
|
||||
-> Seq Scan on lazyagg.t
|
||||
Output: t.b
|
||||
(15 rows)
|
||||
|
||||
-- multi-usage
|
||||
explain (costs off, verbose on) with s1(b, cc) as (select b, sum(c) from t1 group by b) select count(*) from s1 where cc > (select sum(cc)/100 from s1) order by 1;
|
||||
|
||||
@ -1,501 +1,503 @@
|
||||
create schema inlist2join_c;
|
||||
set current_schema=inlist2join_c;
|
||||
set qrw_inlist2join_optmode=1;
|
||||
create table t1(c1 int, c2 int, c3 int) with (orientation=column) distribute by hash(c1);
|
||||
insert into t1 select v,v,v from generate_series(1,12) as v;
|
||||
create table t2(c1 int, c2 int, c3 int) with (orientation=column) distribute by hash(c1);
|
||||
insert into t2 select v,v,v from generate_series(1,10) as v;
|
||||
explain (costs off) select c1,c2 from t1 where t1.c2 in (3,4,7);
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_c.t1.c2 = "*VALUES*".column1)
|
||||
-> CStore Scan on t1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(7 rows)
|
||||
|
||||
select c1,c2 from t1 where t1.c2 in (3,4,7) order by 1;
|
||||
c1 | c2
|
||||
----+----
|
||||
3 | 3
|
||||
4 | 4
|
||||
7 | 7
|
||||
(3 rows)
|
||||
|
||||
explain (costs off) select c1,c3 from t1 where t1.c2 in (3,4,7);
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_c.t1.c2 = "*VALUES*".column1)
|
||||
-> CStore Scan on t1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(7 rows)
|
||||
|
||||
select c1,c3 from t1 where t1.c3 in (3,4,7) order by 1;
|
||||
c1 | c3
|
||||
----+----
|
||||
3 | 3
|
||||
4 | 4
|
||||
7 | 7
|
||||
(3 rows)
|
||||
|
||||
explain (costs off) select c2,c3 from t1 where t1.c2 in (3,4,7);
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_c.t1.c2 = "*VALUES*".column1)
|
||||
-> CStore Scan on t1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(7 rows)
|
||||
|
||||
select c2,c3 from t1 where t1.c3 in (3,4,7) order by 1;
|
||||
c2 | c3
|
||||
----+----
|
||||
3 | 3
|
||||
4 | 4
|
||||
7 | 7
|
||||
(3 rows)
|
||||
|
||||
explain (costs off) select t1.c1 as c1, t2.c2 as c2
|
||||
from t1,t2
|
||||
where t1.c1 = t2.c1 and t1.c1 in (3,4,5,6)
|
||||
order by 1,2;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_c.t1.c1, inlist2join_c.t2.c2
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_c.t1.c1, inlist2join_c.t2.c2
|
||||
-> Vector Nest Loop
|
||||
Join Filter: (inlist2join_c.t1.c1 = inlist2join_c.t2.c1)
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_c.t1.c1 = "*VALUES*".column1)
|
||||
-> CStore Scan on t1
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
-> Vector Materialize
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_c.t2.c1 = "*VALUES*".column1)
|
||||
-> CStore Scan on t2
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(20 rows)
|
||||
|
||||
select t1.c1 as c1, t2.c2 as c2
|
||||
from t1,t2
|
||||
where t1.c1 = t2.c1 and t1.c1 in (3,4,5,6)
|
||||
order by 1,2;
|
||||
c1 | c2
|
||||
----+----
|
||||
3 | 3
|
||||
4 | 4
|
||||
5 | 5
|
||||
6 | 6
|
||||
(4 rows)
|
||||
|
||||
explain (costs off) select * from
|
||||
create schema inlist2join_type_c;
|
||||
set current_schema=inlist2join_type_c;
|
||||
set qrw_inlist2join_optmode = cost_base;
|
||||
create table type
|
||||
(
|
||||
select t1.c1 as c1, t2.c2 as c2, count(*) as sum
|
||||
from t1,t2
|
||||
where t1.c1 = t2.c1
|
||||
group by 1,2
|
||||
) as dt where dt.c1 in (3,4,5,6)
|
||||
order by 1,2,3;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_c.t1.c1, inlist2join_c.t2.c2, (count(*))
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_c.t1.c1, inlist2join_c.t2.c2, (count(*))
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: inlist2join_c.t1.c1, inlist2join_c.t2.c2
|
||||
-> Vector Nest Loop
|
||||
Join Filter: (inlist2join_c.t1.c1 = inlist2join_c.t2.c1)
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_c.t1.c1 = "*VALUES*".column1)
|
||||
-> CStore Scan on t1
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
-> Vector Materialize
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_c.t2.c1 = "*VALUES*".column1)
|
||||
-> CStore Scan on t2
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(22 rows)
|
||||
|
||||
select * from
|
||||
(
|
||||
select t1.c1 as c1, t2.c2 as c2, count(*) as sum
|
||||
from t1,t2
|
||||
where t1.c1 = t2.c1
|
||||
group by 1,2
|
||||
) as dt where dt.c1 in (3,4,5,6)
|
||||
order by 1,2,3;
|
||||
c1 | c2 | sum
|
||||
----+----+-----
|
||||
3 | 3 | 1
|
||||
4 | 4 | 1
|
||||
5 | 5 | 1
|
||||
6 | 6 | 1
|
||||
(4 rows)
|
||||
|
||||
explain (costs off) select t1.c2, count(*) from t1 where t1.c1 in (1,2,3) group by t1.c2 having t1.c2 in (1,3) order by 1;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_c.t1.c2
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_c.t1.c2
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: inlist2join_c.t1.c2
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
-> Vector Nest Loop Semi Join
|
||||
Join Filter: (inlist2join_c.t1.c1 = "*VALUES*".column1)
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_c.t1.c2 = "*VALUES*".column1)
|
||||
-> CStore Scan on t1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
-> Vector Materialize
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(19 rows)
|
||||
|
||||
select t1.c2, count(*) from t1 where t1.c1 in (1,2,3) group by t1.c2 having t1.c2 in (1,3) order by 1;
|
||||
c2 | count
|
||||
----+-------
|
||||
1 | 1
|
||||
3 | 1
|
||||
col_int TINYINT
|
||||
,col_int2 SMALLINT
|
||||
,col_int4 INTEGER
|
||||
,col_int8 BIGINT
|
||||
,col_char CHAR(20)
|
||||
,col_varchar VARCHAR(30)
|
||||
,col_num DECIMAL(10,2)
|
||||
,col_num2 NUMERIC(10,4)
|
||||
,col_float FLOAT4
|
||||
,col_float2 FLOAT8
|
||||
,col_float3 FLOAT(3)
|
||||
,col_float4 BINARY_DOUBLE
|
||||
,col_float5 DECIMAL(10,4)
|
||||
,col_float6 INTEGER(6,3)
|
||||
,col_bool BOOLEAN
|
||||
,col_text TEXT
|
||||
)with (orientation=column);
|
||||
insert into type values
|
||||
(0, 5 , 193540, 1935401906, 'aabccd', 'aabccd', 1.20 , 10.0000, null , 1.1 , 10.1234, 321.321, 123.123654, 123.123654, true,'aabccd'),
|
||||
(1, 6 , 134597, 1345971420, 'abccd', 'abccd' , 11.18, 1.1181 , 55.555, 55.555, 10.1234, 321.321, 123.123654, 123.123654, false, 'abccd' ),
|
||||
(2, 7 , 656473, 656473370 , 'aabccd', 'aabccd', 1.20 , 10.0000, 1.1 , 1.1 , 10.1234, 321.321, 124.123654, 123.123654, true , 'aabccd'),
|
||||
(3, 8 , 126971, 1269710788, 'abccd', 'abccd' , 11.18, 1.1181 , 55.555, 55.555, 10.1234, 321.321, 123.123654, 123.123654, false, 'abccd' ),
|
||||
(4, 9 , 115677, 1156776517, 'aabccd', 'aabccd', 1.20 , 10.0000, 1.1 , 1.1 , 10.1234, 321.321, 123.123654, 124.123654, true , 'aabccd'),
|
||||
(5, 10, 128901, 1289013296, 'abccd', 'abccd' , 11.18, 1.1181 , 55.555, 55.555, 10.1234, 321.321, 123.123654, 123.123654, true , 'abccd' );
|
||||
select col_int from type where col_int in (1,2) order by 1;
|
||||
col_int
|
||||
---------
|
||||
1
|
||||
2
|
||||
(2 rows)
|
||||
|
||||
explain (costs off) select t1.c3, t1.c2 from t1 where t1.c1 > 1 AND t1.c2 in (select t2.c2 from t2 where t2.c1 IN (3,4,5,6,7)) order by 1,2;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------------
|
||||
explain (costs off) select col_int from type where col_int in (1,2) order by 1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: t1.c3, t1.c2
|
||||
-> Vector Sort
|
||||
Sort Key: t1.c3, t1.c2
|
||||
-> Vector Nest Loop Semi Join
|
||||
Join Filter: (t1.c2 = inlist2join_c.t2.c2)
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
-> CStore Scan on t1
|
||||
Filter: (c1 > 1)
|
||||
-> Vector Materialize
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_c.t2.c1 = "*VALUES*".column1)
|
||||
-> CStore Scan on t2
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(18 rows)
|
||||
|
||||
select t1.c3, t1.c2 from t1 where t1.c1 > 1 AND t1.c2 in (select t2.c2 from t2 where t2.c1 IN (3,4,5,6,7)) order by 1,2;
|
||||
c3 | c2
|
||||
----+----
|
||||
3 | 3
|
||||
4 | 4
|
||||
5 | 5
|
||||
6 | 6
|
||||
7 | 7
|
||||
-> Vector Sort
|
||||
Sort Key: col_int
|
||||
-> CStore Scan on type
|
||||
Filter: ((col_int)::bigint = ANY ('{1,2}'::integer[]))
|
||||
(5 rows)
|
||||
|
||||
select t1.c2, sum(t1.c3) from t1 where t1.c1 in (1,2,3) group by t1.c2 order by t1.c2 limit 2;
|
||||
c2 | sum
|
||||
----+-----
|
||||
1 | 1
|
||||
2 | 2
|
||||
select col_int2 from type where col_int2 in (5,10) order by 1;
|
||||
col_int2
|
||||
----------
|
||||
5
|
||||
10
|
||||
(2 rows)
|
||||
|
||||
select max(t1.c2) from t1 where t1.c1 < 4 and t1.c1 in (2,3,4);
|
||||
max
|
||||
-----
|
||||
3
|
||||
explain (costs off) select col_int2 from type where col_int2 in (5,10) order by 1;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_int2
|
||||
-> CStore Scan on type
|
||||
Filter: (col_int2 = ANY ('{5,10}'::integer[]))
|
||||
(5 rows)
|
||||
|
||||
select col_int4 from type where col_int4 in (134597, 134597) order by 1;
|
||||
col_int4
|
||||
----------
|
||||
134597
|
||||
(1 row)
|
||||
|
||||
select t1.c2, t2.c3, count(*) from t1,t2 where t1.c1 = t2.c2 and t1.c1 in (1,2,3) group by t1.c2,t2.c3 order by t1.c2;
|
||||
c2 | c3 | count
|
||||
----+----+-------
|
||||
1 | 1 | 1
|
||||
2 | 2 | 1
|
||||
3 | 3 | 1
|
||||
(3 rows)
|
||||
|
||||
select t1.c2, t2.c3, sum(t1.c3) from t1,t2 where t1.c1 = t2.c2 and t1.c1 in (1,2,3) group by t1.c2,t2.c3 order by t1.c2 limit 2;
|
||||
c2 | c3 | sum
|
||||
----+----+-----
|
||||
1 | 1 | 1
|
||||
2 | 2 | 2
|
||||
(2 rows)
|
||||
|
||||
select * from (select * from t1 where t1.c1 in (1,4,11) union all select * from t2) as dt order by 1;
|
||||
c1 | c2 | c3
|
||||
----+----+----
|
||||
1 | 1 | 1
|
||||
1 | 1 | 1
|
||||
2 | 2 | 2
|
||||
3 | 3 | 3
|
||||
4 | 4 | 4
|
||||
4 | 4 | 4
|
||||
5 | 5 | 5
|
||||
6 | 6 | 6
|
||||
7 | 7 | 7
|
||||
8 | 8 | 8
|
||||
9 | 9 | 9
|
||||
10 | 10 | 10
|
||||
11 | 11 | 11
|
||||
(13 rows)
|
||||
|
||||
select * from (select * from t1 union all select * from t2 where t2.c1 in (1,4,11)) as dt order by 1;
|
||||
c1 | c2 | c3
|
||||
----+----+----
|
||||
1 | 1 | 1
|
||||
1 | 1 | 1
|
||||
2 | 2 | 2
|
||||
3 | 3 | 3
|
||||
4 | 4 | 4
|
||||
4 | 4 | 4
|
||||
5 | 5 | 5
|
||||
6 | 6 | 6
|
||||
7 | 7 | 7
|
||||
8 | 8 | 8
|
||||
9 | 9 | 9
|
||||
10 | 10 | 10
|
||||
11 | 11 | 11
|
||||
12 | 12 | 12
|
||||
(14 rows)
|
||||
|
||||
select * from (select * from t1 where t1.c1 in (1,4,11) union all select * from t2 where t2.c1 in (2,3)) as dt order by 1;
|
||||
c1 | c2 | c3
|
||||
----+----+----
|
||||
1 | 1 | 1
|
||||
2 | 2 | 2
|
||||
3 | 3 | 3
|
||||
4 | 4 | 4
|
||||
11 | 11 | 11
|
||||
explain (costs off) select col_int4 from type where col_int4 in (134597, 134597) order by 1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_int4
|
||||
-> CStore Scan on type
|
||||
Filter: (col_int4 = ANY ('{134597,134597}'::integer[]))
|
||||
(5 rows)
|
||||
|
||||
--测试expression inlist场景
|
||||
-- allow for inlist2join
|
||||
explain (costs off) select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c1 + 2) in (1,2,3,4,5) order by 1;
|
||||
select col_int8 from type where col_int8 in (1345971420, 1156776517) order by 1;
|
||||
col_int8
|
||||
------------
|
||||
1156776517
|
||||
1345971420
|
||||
(2 rows)
|
||||
|
||||
explain (costs off) select col_int8 from type where col_int8 in (1345971420, 1156776517) order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_int8
|
||||
-> CStore Scan on type
|
||||
Filter: (col_int8 = ANY ('{1345971420,1156776517}'::bigint[]))
|
||||
(5 rows)
|
||||
|
||||
select col_char from type where col_char in ('aabccd','aabccd', 'aab') order by 1;
|
||||
col_char
|
||||
----------------------
|
||||
aabccd
|
||||
aabccd
|
||||
aabccd
|
||||
(3 rows)
|
||||
|
||||
explain (costs off) select col_char from type where col_char in ('aabccd','aabccd', 'aab') order by 1;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_char
|
||||
-> CStore Scan on type
|
||||
Filter: (col_char = ANY ('{aabccd,aabccd,aab}'::bpchar[]))
|
||||
(5 rows)
|
||||
|
||||
select col_varchar from type where col_varchar in ('abccd', 'abc','aac') order by 1;
|
||||
col_varchar
|
||||
-------------
|
||||
abccd
|
||||
abccd
|
||||
abccd
|
||||
(3 rows)
|
||||
|
||||
explain (costs off) select col_varchar from type where col_varchar in ('abccd', 'abc','aac') order by 1;
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_varchar
|
||||
-> CStore Scan on type
|
||||
Filter: ((col_varchar)::text = ANY ('{abccd,abc,aac}'::text[]))
|
||||
(5 rows)
|
||||
|
||||
select col_num from type where col_num in (1.20, 11.18, 3,45) order by 1;
|
||||
col_num
|
||||
---------
|
||||
1.20
|
||||
1.20
|
||||
1.20
|
||||
11.18
|
||||
11.18
|
||||
11.18
|
||||
(6 rows)
|
||||
|
||||
explain (costs off) select col_num from type where col_num in (1.20, 11.18, 3,45) order by 1;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_num
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_num = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
|
||||
select col_num2 from type where col_num2 in (1.1181, 10.0000) order by 1;
|
||||
col_num2
|
||||
----------
|
||||
1.1181
|
||||
1.1181
|
||||
1.1181
|
||||
10.0000
|
||||
10.0000
|
||||
10.0000
|
||||
(6 rows)
|
||||
|
||||
explain (costs off) select col_num2 from type where col_num2 in (1.1181, 10.0000) order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_num2
|
||||
-> CStore Scan on type
|
||||
Filter: (col_num2 = ANY ('{1.1181,10.0000}'::numeric[]))
|
||||
(5 rows)
|
||||
|
||||
select col_float from type where col_float in (1.1, 55.555) order by 1;
|
||||
col_float
|
||||
-----------
|
||||
(0 rows)
|
||||
|
||||
explain (costs off) select col_float from type where col_float in (1.1, 55.555) order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_float
|
||||
-> CStore Scan on type
|
||||
Filter: (col_float = ANY ('{1.1,55.555}'::double precision[]))
|
||||
(5 rows)
|
||||
|
||||
select col_float2 from type where col_float2 in (10.1234, 1.1, 11.2222) order by 1;
|
||||
col_float2
|
||||
------------
|
||||
1.1
|
||||
1.1
|
||||
1.1
|
||||
(3 rows)
|
||||
|
||||
explain (costs off) select col_float2 from type where col_float2 in (10.1234, 1.1, 11.2222) order by 1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_float2
|
||||
-> CStore Scan on type
|
||||
Filter: (col_float2 = ANY ('{10.1234,1.1,11.2222}'::double precision[]))
|
||||
(5 rows)
|
||||
|
||||
select col_float3 from type where col_float3 in (341.321, 10.1234, 10.1114, 11.2222) order by 1;
|
||||
col_float3
|
||||
------------
|
||||
(0 rows)
|
||||
|
||||
explain (costs off) select col_float3 from type where col_float3 in (341.321, 10.1234, 10.1114, 11.2222) order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_float3
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_float3 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
|
||||
select col_float4 from type where col_float4 in (321.321, 500.123) order by 1;
|
||||
col_float4
|
||||
------------
|
||||
321.321
|
||||
321.321
|
||||
321.321
|
||||
321.321
|
||||
321.321
|
||||
321.321
|
||||
(6 rows)
|
||||
|
||||
explain (costs off) select col_float4 from type where col_float4 in (321.321, 500.123) order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_float4
|
||||
-> CStore Scan on type
|
||||
Filter: (col_float4 = ANY ('{321.321,500.123}'::double precision[]))
|
||||
(5 rows)
|
||||
|
||||
select col_float5 from type where col_float5 in (123.123654, 123.1237) order by 1;
|
||||
col_float5
|
||||
------------
|
||||
123.1237
|
||||
123.1237
|
||||
123.1237
|
||||
123.1237
|
||||
123.1237
|
||||
(5 rows)
|
||||
|
||||
explain (costs off) select col_float5 from type where col_float5 in (123.123654,123.1237) order by 1;
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_float5
|
||||
-> CStore Scan on type
|
||||
Filter: (col_float5 = ANY ('{123.123654,123.1237}'::numeric[]))
|
||||
(5 rows)
|
||||
|
||||
select col_float6 from type where col_float6 in (123.124, 113.123654) order by 1;
|
||||
col_float6
|
||||
------------
|
||||
123.124
|
||||
123.124
|
||||
123.124
|
||||
123.124
|
||||
123.124
|
||||
(5 rows)
|
||||
|
||||
explain (costs off) select col_float6 from type where col_float6 in (123.124, 113.123654) order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_float6
|
||||
-> CStore Scan on type
|
||||
Filter: (col_float6 = ANY ('{123.124,113.123654}'::numeric[]))
|
||||
(5 rows)
|
||||
|
||||
select col_bool from type where col_bool in (true, false) order by 1;
|
||||
col_bool
|
||||
----------
|
||||
f
|
||||
f
|
||||
t
|
||||
t
|
||||
t
|
||||
t
|
||||
(6 rows)
|
||||
|
||||
explain (costs off) select col_bool from type where col_bool in (true, false) order by 1;
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_bool
|
||||
-> CStore Scan on type
|
||||
Filter: (col_bool = ANY ('{t,f}'::boolean[]))
|
||||
(5 rows)
|
||||
|
||||
select col_text from type where col_text in ('abccd', 'aab') order by 1;
|
||||
col_text
|
||||
----------
|
||||
abccd
|
||||
abccd
|
||||
abccd
|
||||
(3 rows)
|
||||
|
||||
explain (costs off) select col_text from type where col_text in ('abccd', 'aab') order by 1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_text
|
||||
-> CStore Scan on type
|
||||
Filter: (col_text = ANY ('{abccd,aab}'::text[]))
|
||||
(5 rows)
|
||||
|
||||
CREATE TABLE time
|
||||
(
|
||||
col_int int
|
||||
,col_date date
|
||||
,col_timestamp timestamp
|
||||
,col_timestamptz timestamptz
|
||||
,col_smalldatetime smalldatetime
|
||||
,col_char char
|
||||
,col_interval interval
|
||||
,col_time time
|
||||
,col_timetz timetz
|
||||
,col_tinterval tinterval
|
||||
)with (orientation=column);
|
||||
COPY time(col_int, col_date, col_timestamp, col_timestamptz, col_smalldatetime, col_char, col_interval, col_time, col_timetz, col_tinterval) FROM stdin;
|
||||
select col_char from time where col_char in ('a', 'd') order by 1;
|
||||
col_char
|
||||
----------
|
||||
a
|
||||
d
|
||||
(2 rows)
|
||||
|
||||
explain (costs off) select col_char from time where col_char in ('a', 'd') order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_char
|
||||
-> CStore Scan on "time"
|
||||
Filter: (col_char = ANY ('{a,d}'::bpchar[]))
|
||||
(5 rows)
|
||||
|
||||
select col_date from time where col_date in ('2011-11-01 00:00:00', '2012-11-02 00:00:00') order by 1;
|
||||
col_date
|
||||
--------------------------
|
||||
Tue Nov 01 00:00:00 2011
|
||||
Tue Nov 01 00:00:00 2011
|
||||
Fri Nov 02 00:00:00 2012
|
||||
Fri Nov 02 00:00:00 2012
|
||||
(4 rows)
|
||||
|
||||
explain (costs off) select col_date from time where col_date in ('2011-11-01 00:00:00', '2012-11-02 00:00:00') order by 1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_date
|
||||
-> CStore Scan on "time"
|
||||
Filter: (col_date = ANY ('{"Tue Nov 01 00:00:00 2011","Fri Nov 02 00:00:00 2012"}'::timestamp without time zone[]))
|
||||
(5 rows)
|
||||
|
||||
select col_timestamp from time where col_timestamp in ('2017-09-09 19:45:37', '2017-09-09 19:45:37') order by 1;
|
||||
col_timestamp
|
||||
--------------------------
|
||||
Sat Sep 09 19:45:37 2017
|
||||
(1 row)
|
||||
|
||||
explain (costs off) select col_timestamp from time where col_timestamp in ('2017-09-09 19:45:37', '2017-09-09 19:45:37') order by 1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_timestamp
|
||||
-> CStore Scan on "time"
|
||||
Filter: (col_timestamp = ANY ('{"Sat Sep 09 19:45:37 2017","Sat Sep 09 19:45:37 2017"}'::timestamp without time zone[]))
|
||||
(5 rows)
|
||||
|
||||
select col_timestamptz from time where col_timestamptz in ('2017-09-09 19:45:37', '2017-09-09 19:45:37') order by 1;
|
||||
col_timestamptz
|
||||
------------------------------
|
||||
Sat Sep 09 19:45:37 2017 PDT
|
||||
(1 row)
|
||||
|
||||
explain (costs off) select col_timestamptz from time where col_timestamptz in ('2017-09-09 19:45:37', '2017-09-09 19:45:37') order by 1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_timestamptz
|
||||
-> CStore Scan on "time"
|
||||
Filter: (col_timestamptz = ANY ('{"Sat Sep 09 19:45:37 2017 PDT","Sat Sep 09 19:45:37 2017 PDT"}'::timestamp with time zone[]))
|
||||
(5 rows)
|
||||
|
||||
select col_smalldatetime from time where col_smalldatetime in ('2017-09-09 19:45:37', '2003-04-12 04:05:06') order by 1;
|
||||
col_smalldatetime
|
||||
--------------------------
|
||||
Sat Apr 12 04:05:00 2003
|
||||
Sat Apr 12 04:05:00 2003
|
||||
Sat Apr 12 04:05:00 2003
|
||||
Sat Apr 12 04:05:00 2003
|
||||
(4 rows)
|
||||
|
||||
explain (costs off) select col_smalldatetime from time where col_smalldatetime in ('2017-09-09 19:45:37', '2003-04-12 04:05:06') order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Sort
|
||||
Sort Key: col_smalldatetime
|
||||
-> CStore Scan on "time"
|
||||
Filter: (col_smalldatetime = ANY ('{"Sat Sep 09 19:46:00 2017","Sat Apr 12 04:05:00 2003"}'::smalldatetime[]))
|
||||
(5 rows)
|
||||
|
||||
select col_time from time where col_time in ('08:00:30', '00:00:30', '12:00:30') order by 1;
|
||||
col_time
|
||||
----------
|
||||
08:00:30
|
||||
(1 row)
|
||||
|
||||
explain (costs off) select col_time from time where col_time in ('08:00:30', '00:00:30', '12:00:30') order by 1;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_c.t1.c1
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_c.t1.c1
|
||||
-> Vector Nest Loop
|
||||
Join Filter: (inlist2join_c.t1.c1 = inlist2join_c.t2.c1)
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: ((inlist2join_c.t1.c1 + 2) = "*VALUES*".column1)
|
||||
-> CStore Scan on t1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
-> Vector Materialize
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: ((inlist2join_c.t2.c1 + 2) = "*VALUES*".column1)
|
||||
-> CStore Scan on t2
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(19 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: col_time
|
||||
-> CStore Scan on "time"
|
||||
Filter: (col_time = ANY ('{08:00:30,00:00:30,12:00:30}'::time without time zone[]))
|
||||
(5 rows)
|
||||
|
||||
select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c1 + 2) in (1,2,3,4,5) order by 1;
|
||||
c1 | c1
|
||||
----+----
|
||||
1 | 1
|
||||
2 | 2
|
||||
3 | 3
|
||||
(3 rows)
|
||||
select col_timetz from time where col_timetz in ('08:00:30+08', '00:00:30+08', '12:00:30+08') order by 1;
|
||||
col_timetz
|
||||
-------------
|
||||
08:00:30+08
|
||||
(1 row)
|
||||
|
||||
explain (costs off) select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c2 * 2) in (1,2,3,4,5) order by 1;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------
|
||||
explain (costs off) select col_timetz from time where col_timetz in ('08:00:30+08', '00:00:30+08', '12:00:30+08') order by 1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_c.t1.c1
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_c.t1.c1
|
||||
-> Vector Nest Loop
|
||||
Join Filter: (inlist2join_c.t1.c1 = t2.c1)
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: ((inlist2join_c.t1.c2 * 2) = "*VALUES*".column1)
|
||||
-> CStore Scan on t1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
-> CStore Scan on t2
|
||||
(13 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: col_timetz
|
||||
-> CStore Scan on "time"
|
||||
Filter: (col_timetz = ANY ('{08:00:30+08,00:00:30+08,12:00:30+08}'::time with time zone[]))
|
||||
(5 rows)
|
||||
|
||||
select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c2 *2) in (1,2,3,4,5) order by 1;
|
||||
c1 | c1
|
||||
----+----
|
||||
1 | 1
|
||||
2 | 2
|
||||
select col_interval from time where col_interval in ('2 day 13:34:56', '1 day 18:34:56') order by 1;
|
||||
col_interval
|
||||
-----------------------------------
|
||||
@ 1 day 18 hours 34 mins 56 secs
|
||||
@ 2 days 13 hours 34 mins 56 secs
|
||||
(2 rows)
|
||||
|
||||
-- disallow for inlistjoin
|
||||
explain (costs off) select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c1 + t1.c2) in (1,2,3,4,5) order by 1;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------
|
||||
explain (costs off) select col_interval from time where col_interval in ('2 day 13:34:56', '1 day 18:34:56') order by 1;
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: t1.c1
|
||||
-> Vector Sort
|
||||
Sort Key: t1.c1
|
||||
-> Vector Nest Loop
|
||||
Join Filter: (t1.c1 = t2.c1)
|
||||
-> CStore Scan on t1
|
||||
Filter: ((c1 + c2) = ANY ('{1,2,3,4,5}'::integer[]))
|
||||
-> CStore Scan on t2
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: col_interval
|
||||
-> CStore Scan on "time"
|
||||
Filter: (col_interval = ANY ('{"@ 2 days 13 hours 34 mins 56 secs","@ 1 day 18 hours 34 mins 56 secs"}'::interval[]))
|
||||
(5 rows)
|
||||
|
||||
select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c1 + t2.c2) in (1,2,3,4,5) order by 1;
|
||||
c1 | c1
|
||||
----+----
|
||||
1 | 1
|
||||
2 | 2
|
||||
select col_tinterval from time where col_tinterval in ('["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]', '["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]') order by 1;
|
||||
col_tinterval
|
||||
-----------------------------------------------------------------
|
||||
["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||
["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||
(2 rows)
|
||||
|
||||
--
|
||||
-- forbid inlist2join query rewrite if there's subplan
|
||||
set qrw_inlist2join_optmode=1;
|
||||
create table t3(c1 int, c2 int, c3 int) distribute by hash(c1);
|
||||
insert into t3 select v,v,v from generate_series(1,10) as v;
|
||||
-- the sublink can be pull up, so there is no subpaln, do inlist2join
|
||||
explain (costs off) select * from t1 where t1.c1 in (select c1 from t2 where t2.c2 > 2) AND t1.c2 in (1,2,3);
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------
|
||||
explain (costs off) select col_tinterval from time where col_tinterval in ('["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]', '["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]') order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> Vector Nest Loop Semi Join
|
||||
Join Filter: (inlist2join_c.t1.c1 = t2.c1)
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_c.t1.c2 = "*VALUES*".column1)
|
||||
-> CStore Scan on t1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
-> Vector Materialize
|
||||
-> CStore Scan on t2
|
||||
Filter: (c2 > 2)
|
||||
(12 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: col_tinterval
|
||||
-> CStore Scan on "time"
|
||||
Filter: (col_tinterval = ANY ('{"[\"Sun Sep 04 23:59:12 1983 PDT\" \"Tue Oct 04 23:59:12 1983 PDT\"]","[\"Sat May 10 23:59:12 1947 PST\" \"Sun Jan 14 03:14:21 1973 PST\"]"}'::tinterval[]))
|
||||
(5 rows)
|
||||
|
||||
explain (costs off) select * from t1 where exists (select c1 from t2 where t2.c2 = t1.c1) and t1.c1 in (1,2,3);
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> Vector Nest Loop Semi Join
|
||||
Join Filter: (inlist2join_c.t1.c1 = inlist2join_c.t2.c2)
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_c.t1.c1 = "*VALUES*".column1)
|
||||
-> CStore Scan on t1
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
-> Vector Materialize
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_c.t2.c2 = "*VALUES*".column1)
|
||||
-> CStore Scan on t2
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(17 rows)
|
||||
|
||||
explain (costs off) select * from t1 join t2 on t1.c1=t2.c1 and t1.c1 not in (select c2 from t3 where t3.c2>2) and t1.c3 in (1,2,3);
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
-> Nested Loop Anti Join
|
||||
Join Filter: ((inlist2join_c.t1.c1 = t3.c2) OR (inlist2join_c.t1.c1 IS NULL) OR (t3.c2 IS NULL))
|
||||
-> Nested Loop
|
||||
Join Filter: (inlist2join_c.t1.c1 = t2.c1)
|
||||
-> Hash Semi Join
|
||||
Hash Cond: (inlist2join_c.t1.c3 = "*VALUES*".column1)
|
||||
-> Row Adapter
|
||||
-> CStore Scan on t1
|
||||
-> Hash
|
||||
-> Values Scan on "*VALUES*"
|
||||
-> Row Adapter
|
||||
-> CStore Scan on t2
|
||||
-> Materialize
|
||||
-> Streaming(type: BROADCAST)
|
||||
-> Seq Scan on t3
|
||||
Filter: (c2 > 2)
|
||||
(17 rows)
|
||||
|
||||
-- the sublink can not be pull up, so there is subpaln, do not inlist2join
|
||||
explain (costs off) select * from t1 where t1.c1 in (select c1 from t2 where t2.c2 = t1.c2) AND t1.c2 in (1,2,3);
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Scan on t1
|
||||
Filter: ((c2 = ANY ('{1,2,3}'::integer[])) AND (SubPlan 1))
|
||||
SubPlan 1
|
||||
-> Row Adapter
|
||||
-> Vector Result
|
||||
Filter: (t2.c2 = t1.c2)
|
||||
-> Vector Materialize
|
||||
-> Vector Streaming(type: BROADCAST)
|
||||
-> CStore Scan on t2
|
||||
(11 rows)
|
||||
|
||||
explain (costs off) select * from t1 where exists (select c1 from t2 where t2.c2 > 2) and t1.c1 in (1,2,3);
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
InitPlan 1 (returns $0)
|
||||
-> Row Adapter
|
||||
-> Vector Streaming(type: BROADCAST)
|
||||
-> CStore Scan on t2
|
||||
Filter: (c2 > 2)
|
||||
-> Vector Result
|
||||
One-Time Filter: $0
|
||||
-> CStore Scan on t1
|
||||
Filter: (c1 = ANY ('{1,2,3}'::integer[]))
|
||||
(11 rows)
|
||||
|
||||
explain (costs off) select * from t1 join t2 on t1.c1=t2.c1 and t1.c1 not in (select c2 from t3 where t3.c2=t1.c2) and t1.c3 in (1,2,3);
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> Vector Nest Loop
|
||||
Join Filter: (t1.c1 = t2.c1)
|
||||
-> CStore Scan on t1
|
||||
Filter: ((c3 = ANY ('{1,2,3}'::integer[])) AND (NOT (SubPlan 1)))
|
||||
SubPlan 1
|
||||
-> Result
|
||||
Filter: (t3.c2 = t1.c2)
|
||||
-> Materialize
|
||||
-> Streaming(type: BROADCAST)
|
||||
-> Seq Scan on t3
|
||||
-> CStore Scan on t2
|
||||
(13 rows)
|
||||
|
||||
--
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
drop schema inlist2join_c cascade;
|
||||
drop schema inlist2join_type_c cascade;
|
||||
NOTICE: drop cascades to 2 other objects
|
||||
DETAIL: drop cascades to table type
|
||||
drop cascades to table "time"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -19,8 +19,7 @@ create table type
|
||||
,col_float6 INTEGER(6,3)
|
||||
,col_bool BOOLEAN
|
||||
,col_text TEXT
|
||||
)with (orientation=column)
|
||||
distribute by hash(col_int);
|
||||
)with (orientation=column);
|
||||
insert into type values
|
||||
(0, 5 , 193540, 1935401906, 'aabccd', 'aabccd', 1.20 , 10.0000, null , 1.1 , 10.1234, 321.321, 123.123654, 123.123654, true,'aabccd'),
|
||||
(1, 6 , 134597, 1345971420, 'abccd', 'abccd' , 11.18, 1.1181 , 55.555, 55.555, 10.1234, 321.321, 123.123654, 123.123654, false, 'abccd' ),
|
||||
@ -36,17 +35,17 @@ select col_int from type where col_int in (1,2) order by 1;
|
||||
(2 rows)
|
||||
|
||||
explain (costs off) select col_int from type where col_int in (1,2) order by 1;
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c.type.col_int
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_int
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: ((inlist2join_type_c.type.col_int)::bigint = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_int
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: ((inlist2join_type_c.type.col_int)::bigint = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Unique
|
||||
-> Vector Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
@ -59,19 +58,20 @@ select col_int2 from type where col_int2 in (5,10) order by 1;
|
||||
(2 rows)
|
||||
|
||||
explain (costs off) select col_int2 from type where col_int2 in (5,10) order by 1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c.type.col_int2
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_int2
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_int2 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_int2
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_int2 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Unique
|
||||
-> Vector Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
|
||||
select col_int4 from type where col_int4 in (134597, 134597) order by 1;
|
||||
col_int4
|
||||
@ -80,19 +80,20 @@ select col_int4 from type where col_int4 in (134597, 134597) order by 1;
|
||||
(1 row)
|
||||
|
||||
explain (costs off) select col_int4 from type where col_int4 in (134597, 134597) order by 1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c.type.col_int4
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_int4
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_int4 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_int4
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_int4 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Unique
|
||||
-> Vector Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
|
||||
select col_int8 from type where col_int8 in (1345971420, 1156776517) order by 1;
|
||||
col_int8
|
||||
@ -102,19 +103,20 @@ select col_int8 from type where col_int8 in (1345971420, 1156776517) order by 1;
|
||||
(2 rows)
|
||||
|
||||
explain (costs off) select col_int8 from type where col_int8 in (1345971420, 1156776517) order by 1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c.type.col_int8
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_int8
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_int8 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_int8
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_int8 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Unique
|
||||
-> Vector Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
|
||||
select col_char from type where col_char in ('aabccd','aabccd', 'aab') order by 1;
|
||||
col_char
|
||||
@ -125,16 +127,16 @@ select col_char from type where col_char in ('aabccd','aabccd', 'aab') order by
|
||||
(3 rows)
|
||||
|
||||
explain (costs off) select col_char from type where col_char in ('aabccd','aabccd', 'aab') order by 1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c.type.col_char
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_char
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_char = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_char
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_char = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
@ -148,16 +150,16 @@ select col_varchar from type where col_varchar in ('abccd', 'abc','aac') order b
|
||||
(3 rows)
|
||||
|
||||
explain (costs off) select col_varchar from type where col_varchar in ('abccd', 'abc','aac') order by 1;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c.type.col_varchar
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_varchar
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: ((inlist2join_type_c.type.col_varchar)::text = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_varchar
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: ((inlist2join_type_c.type.col_varchar)::text = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
@ -174,16 +176,16 @@ select col_num from type where col_num in (1.20, 11.18, 3,45) order by 1;
|
||||
(6 rows)
|
||||
|
||||
explain (costs off) select col_num from type where col_num in (1.20, 11.18, 3,45) order by 1;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c.type.col_num
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_num
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_num = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_num
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_num = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
@ -200,19 +202,20 @@ select col_num2 from type where col_num2 in (1.1181, 10.0000) order by 1;
|
||||
(6 rows)
|
||||
|
||||
explain (costs off) select col_num2 from type where col_num2 in (1.1181, 10.0000) order by 1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c.type.col_num2
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_num2
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_num2 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_num2
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_num2 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Unique
|
||||
-> Vector Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
|
||||
select col_float from type where col_float in (1.1, 55.555) order by 1;
|
||||
col_float
|
||||
@ -220,19 +223,20 @@ select col_float from type where col_float in (1.1, 55.555) order by 1;
|
||||
(0 rows)
|
||||
|
||||
explain (costs off) select col_float from type where col_float in (1.1, 55.555) order by 1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c.type.col_float
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_float
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_float = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_float
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_float = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Unique
|
||||
-> Vector Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
|
||||
select col_float2 from type where col_float2 in (10.1234, 1.1, 11.2222) order by 1;
|
||||
col_float2
|
||||
@ -243,16 +247,16 @@ select col_float2 from type where col_float2 in (10.1234, 1.1, 11.2222) order by
|
||||
(3 rows)
|
||||
|
||||
explain (costs off) select col_float2 from type where col_float2 in (10.1234, 1.1, 11.2222) order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c.type.col_float2
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_float2
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_float2 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_float2
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_float2 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
@ -263,16 +267,16 @@ select col_float3 from type where col_float3 in (341.321, 10.1234, 10.1114, 11.2
|
||||
(0 rows)
|
||||
|
||||
explain (costs off) select col_float3 from type where col_float3 in (341.321, 10.1234, 10.1114, 11.2222) order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c.type.col_float3
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_float3
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_float3 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_float3
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_float3 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
@ -289,19 +293,20 @@ select col_float4 from type where col_float4 in (321.321, 500.123) order by 1;
|
||||
(6 rows)
|
||||
|
||||
explain (costs off) select col_float4 from type where col_float4 in (321.321, 500.123) order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c.type.col_float4
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_float4
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_float4 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_float4
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_float4 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Unique
|
||||
-> Vector Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
|
||||
select col_float5 from type where col_float5 in (123.123654, 123.1237) order by 1;
|
||||
col_float5
|
||||
@ -314,19 +319,20 @@ select col_float5 from type where col_float5 in (123.123654, 123.1237) order by
|
||||
(5 rows)
|
||||
|
||||
explain (costs off) select col_float5 from type where col_float5 in (123.123654,123.1237) order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c.type.col_float5
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_float5
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_float5 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_float5
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_float5 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Unique
|
||||
-> Vector Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
|
||||
select col_float6 from type where col_float6 in (123.124, 113.123654) order by 1;
|
||||
col_float6
|
||||
@ -339,19 +345,20 @@ select col_float6 from type where col_float6 in (123.124, 113.123654) order by 1
|
||||
(5 rows)
|
||||
|
||||
explain (costs off) select col_float6 from type where col_float6 in (123.124, 113.123654) order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c.type.col_float6
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_float6
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_float6 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_float6
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_float6 = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Unique
|
||||
-> Vector Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
|
||||
select col_bool from type where col_bool in (true, false) order by 1;
|
||||
col_bool
|
||||
@ -365,19 +372,17 @@ select col_bool from type where col_bool in (true, false) order by 1;
|
||||
(6 rows)
|
||||
|
||||
explain (costs off) select col_bool from type where col_bool in (true, false) order by 1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c.type.col_bool
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_bool
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_bool = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_bool
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_bool = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(8 rows)
|
||||
|
||||
select col_text from type where col_text in ('abccd', 'aab') order by 1;
|
||||
col_text
|
||||
@ -388,19 +393,20 @@ select col_text from type where col_text in ('abccd', 'aab') order by 1;
|
||||
(3 rows)
|
||||
|
||||
explain (costs off) select col_text from type where col_text in ('abccd', 'aab') order by 1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c.type.col_text
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_text
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_text = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c.type.col_text
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c.type.col_text = "*VALUES*".column1)
|
||||
-> CStore Scan on type
|
||||
-> Vector Unique
|
||||
-> Vector Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
|
||||
CREATE TABLE time
|
||||
(
|
||||
@ -414,8 +420,7 @@ CREATE TABLE time
|
||||
,col_time time
|
||||
,col_timetz timetz
|
||||
,col_tinterval tinterval
|
||||
)with (orientation=column)
|
||||
distribute by hash(col_int);
|
||||
)with (orientation=column);
|
||||
COPY time(col_int, col_date, col_timestamp, col_timestamptz, col_smalldatetime, col_char, col_interval, col_time, col_timetz, col_tinterval) FROM stdin;
|
||||
select col_char from time where col_char in ('a', 'd') order by 1;
|
||||
col_char
|
||||
@ -425,19 +430,20 @@ select col_char from time where col_char in ('a', 'd') order by 1;
|
||||
(2 rows)
|
||||
|
||||
explain (costs off) select col_char from time where col_char in ('a', 'd') order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c."time".col_char
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_char
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c."time".col_char = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_char
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c."time".col_char = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Unique
|
||||
-> Vector Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
|
||||
select col_date from time where col_date in ('2011-11-01 00:00:00', '2012-11-02 00:00:00') order by 1;
|
||||
col_date
|
||||
@ -449,19 +455,20 @@ select col_date from time where col_date in ('2011-11-01 00:00:00', '2012-11-02
|
||||
(4 rows)
|
||||
|
||||
explain (costs off) select col_date from time where col_date in ('2011-11-01 00:00:00', '2012-11-02 00:00:00') order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c."time".col_date
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_date
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c."time".col_date = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_date
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c."time".col_date = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Unique
|
||||
-> Vector Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
|
||||
select col_timestamp from time where col_timestamp in ('2017-09-09 19:45:37', '2017-09-09 19:45:37') order by 1;
|
||||
col_timestamp
|
||||
@ -470,19 +477,20 @@ select col_timestamp from time where col_timestamp in ('2017-09-09 19:45:37', '2
|
||||
(1 row)
|
||||
|
||||
explain (costs off) select col_timestamp from time where col_timestamp in ('2017-09-09 19:45:37', '2017-09-09 19:45:37') order by 1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c."time".col_timestamp
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_timestamp
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c."time".col_timestamp = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_timestamp
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c."time".col_timestamp = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Unique
|
||||
-> Vector Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
|
||||
select col_timestamptz from time where col_timestamptz in ('2017-09-09 19:45:37', '2017-09-09 19:45:37') order by 1;
|
||||
col_timestamptz
|
||||
@ -491,19 +499,20 @@ select col_timestamptz from time where col_timestamptz in ('2017-09-09 19:45:37'
|
||||
(1 row)
|
||||
|
||||
explain (costs off) select col_timestamptz from time where col_timestamptz in ('2017-09-09 19:45:37', '2017-09-09 19:45:37') order by 1;
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c."time".col_timestamptz
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_timestamptz
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c."time".col_timestamptz = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_timestamptz
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c."time".col_timestamptz = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Unique
|
||||
-> Vector Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
|
||||
select col_smalldatetime from time where col_smalldatetime in ('2017-09-09 19:45:37', '2003-04-12 04:05:06') order by 1;
|
||||
col_smalldatetime
|
||||
@ -515,19 +524,20 @@ select col_smalldatetime from time where col_smalldatetime in ('2017-09-09 19:45
|
||||
(4 rows)
|
||||
|
||||
explain (costs off) select col_smalldatetime from time where col_smalldatetime in ('2017-09-09 19:45:37', '2003-04-12 04:05:06') order by 1;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c."time".col_smalldatetime
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_smalldatetime
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c."time".col_smalldatetime = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_smalldatetime
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c."time".col_smalldatetime = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Unique
|
||||
-> Vector Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
|
||||
select col_time from time where col_time in ('08:00:30', '00:00:30', '12:00:30') order by 1;
|
||||
col_time
|
||||
@ -536,16 +546,16 @@ select col_time from time where col_time in ('08:00:30', '00:00:30', '12:00:30'
|
||||
(1 row)
|
||||
|
||||
explain (costs off) select col_time from time where col_time in ('08:00:30', '00:00:30', '12:00:30') order by 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c."time".col_time
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_time
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c."time".col_time = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_time
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c."time".col_time = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
@ -557,16 +567,16 @@ select col_timetz from time where col_timetz in ('08:00:30+08', '00:00:30+08',
|
||||
(1 row)
|
||||
|
||||
explain (costs off) select col_timetz from time where col_timetz in ('08:00:30+08', '00:00:30+08', '12:00:30+08') order by 1;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c."time".col_timetz
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_timetz
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c."time".col_timetz = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_timetz
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c."time".col_timetz = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Sonic Hash Aggregate
|
||||
Group By Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
@ -579,19 +589,20 @@ select col_interval from time where col_interval in ('2 day 13:34:56', '1 day 18
|
||||
(2 rows)
|
||||
|
||||
explain (costs off) select col_interval from time where col_interval in ('2 day 13:34:56', '1 day 18:34:56') order by 1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c."time".col_interval
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_interval
|
||||
-> Vector Hash Semi Join
|
||||
Hash Cond: (inlist2join_type_c."time".col_interval = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(10 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_interval
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (inlist2join_type_c."time".col_interval = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Unique
|
||||
-> Vector Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
|
||||
select col_tinterval from time where col_tinterval in ('["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]', '["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]') order by 1;
|
||||
col_tinterval
|
||||
@ -601,20 +612,18 @@ select col_tinterval from time where col_tinterval in ('["Sep 4, 1983 23:59:12"
|
||||
(2 rows)
|
||||
|
||||
explain (costs off) select col_tinterval from time where col_tinterval in ('["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]', '["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]') order by 1;
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_type_c."time".col_tinterval
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_tinterval
|
||||
-> Vector Nest Loop Semi Join
|
||||
Join Filter: (inlist2join_type_c."time".col_tinterval = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Materialize
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(11 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: inlist2join_type_c."time".col_tinterval
|
||||
-> Vector Nest Loop Semi Join
|
||||
Join Filter: (inlist2join_type_c."time".col_tinterval = "*VALUES*".column1)
|
||||
-> CStore Scan on "time"
|
||||
-> Vector Materialize
|
||||
-> Vector Adapter
|
||||
-> Values Scan on "*VALUES*"
|
||||
(9 rows)
|
||||
|
||||
drop schema inlist2join_type_c cascade;
|
||||
NOTICE: drop cascades to 2 other objects
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -37,51 +37,39 @@ END;
|
||||
$$
|
||||
;
|
||||
SELECT gs_parse_page_bypath_test('test_astore', 0, 'heap', true);
|
||||
--?.*
|
||||
--?.*
|
||||
--?.*
|
||||
gs_parse_page_bypath_test
|
||||
-----------------------------------------------------------------------------------------------
|
||||
/data2/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/1663_16384_16387_0.page
|
||||
(1 row)
|
||||
|
||||
SELECT gs_parse_page_bypath_test('test_segment', 0, 'segment', true);
|
||||
--?.*
|
||||
--?.*
|
||||
--?.*
|
||||
gs_parse_page_bypath_test
|
||||
----------------------------------------------------------------------------------------------
|
||||
/data2/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/1663_16384_4157_0.page
|
||||
(1 row)
|
||||
|
||||
CHECKPOINT;
|
||||
SELECT gs_parse_page_bypath_test('test_astore', -1, 'heap', true);
|
||||
--?.*
|
||||
--?.*
|
||||
--?.*
|
||||
(1 row)
|
||||
|
||||
ERROR: could not read block 2 in file "base/16384/16387": read only 0 of 8192 bytes
|
||||
CONTEXT: referenced column: gs_parse_page_bypath
|
||||
PL/pgSQL function gs_parse_page_bypath_test(character varying,integer,character varying,boolean) line 6 at RETURN QUERY
|
||||
referenced column: gs_parse_page_bypath_test
|
||||
SELECT gs_parse_page_bypath_test('test_astore_idx', 1, 'btree', false);
|
||||
--?.*
|
||||
--?.*
|
||||
--?.*
|
||||
(1 row)
|
||||
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block, firstChar[Q]
|
||||
SELECT gs_parse_page_bypath_test('test_ustore', -1, 'uheap', false);
|
||||
--?.*
|
||||
--?.*
|
||||
--?.*
|
||||
(1 row)
|
||||
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block, firstChar[Q]
|
||||
SELECT gs_parse_page_bypath_test('test_ustore_idx', 1, 'ubtree', false);
|
||||
--?.*
|
||||
--?.*
|
||||
--?.*
|
||||
(1 row)
|
||||
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block, firstChar[Q]
|
||||
SELECT gs_parse_page_bypath_test('test_segment', 0, 'segment', false);
|
||||
--?.*
|
||||
--?.*
|
||||
--?.*
|
||||
(1 row)
|
||||
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block, firstChar[Q]
|
||||
DROP INDEX IF EXISTS test_astore_idx;
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block, firstChar[Q]
|
||||
DROP TABLE IF EXISTS test_astore;
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block, firstChar[Q]
|
||||
DROP INDEX IF EXISTS test_ustore_idx;
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block, firstChar[Q]
|
||||
DROP TABLE IF EXISTS test_ustore;
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block, firstChar[Q]
|
||||
DROP TABLE IF EXISTS test_segment;
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block, firstChar[Q]
|
||||
COMMIT;
|
||||
|
||||
@ -21,15 +21,12 @@ insert into test_range_pt select * from test_range_pt;
|
||||
create index idx_local on test_range_pt(a) local;
|
||||
analyze test_range_pt;
|
||||
explain (costs off) select *from test_range_pt where a = 1;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------
|
||||
Partitioned Bitmap Heap Scan on test_range_pt
|
||||
Recheck Cond: (a = 1)
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------
|
||||
Partitioned Index Scan using idx_local on test_range_pt
|
||||
Index Cond: (a = 1)
|
||||
Selected Partitions: 1
|
||||
-> Partitioned Bitmap Index Scan on idx_local
|
||||
Index Cond: (a = 1)
|
||||
Selected Partitions: 1
|
||||
(6 rows)
|
||||
(3 rows)
|
||||
|
||||
explain (costs off) select /*+ set(partition_page_estimation on) */*from test_range_pt where a = 1;
|
||||
QUERY PLAN
|
||||
@ -87,7 +84,7 @@ explain (costs off, verbose on) select a,b,c from test_hash_ht where a = 50;
|
||||
Partitioned Seq Scan on partition_cost_model.test_hash_ht
|
||||
Output: a, b, c
|
||||
Filter: (test_hash_ht.a = 50)
|
||||
Selected Partitions: 11
|
||||
Selected Partitions: 10
|
||||
(4 rows)
|
||||
|
||||
explain (costs off, verbose on) select /*+indexscan(test_hash_ht idx_hash_global)*/ a,b,c from test_hash_ht where a = 50;
|
||||
@ -113,7 +110,7 @@ explain (costs off, verbose on) select a,b,c from test_hash_ht where a = 50;
|
||||
Partitioned Seq Scan on partition_cost_model.test_hash_ht
|
||||
Output: a, b, c
|
||||
Filter: (test_hash_ht.a = 50)
|
||||
Selected Partitions: 11
|
||||
Selected Partitions: 10
|
||||
(4 rows)
|
||||
|
||||
explain (costs off, verbose on) select /*+indexscan(test_hash_ht idx_hash_global)*/ a,b,c from test_hash_ht where a = 50;
|
||||
@ -226,15 +223,19 @@ CREATE INDEX range_list_idx ON range_list(month_code) LOCAL
|
||||
);
|
||||
set partition_page_estimation = off;
|
||||
explain (costs off) select * from range_list where month_code = '201902';
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------
|
||||
Partition Iterator
|
||||
Iterations: 1, Sub Iterations: 2
|
||||
-> Partitioned Seq Scan on range_list
|
||||
Filter: ((month_code)::text = '201902'::text)
|
||||
-> Partitioned Bitmap Heap Scan on range_list
|
||||
Recheck Cond: ((month_code)::text = '201902'::text)
|
||||
Selected Partitions: 1
|
||||
Selected Subpartitions: ALL
|
||||
(6 rows)
|
||||
-> Partitioned Bitmap Index Scan on range_list_idx
|
||||
Index Cond: ((month_code)::text = '201902'::text)
|
||||
Selected Partitions: 1
|
||||
Selected Subpartitions: ALL
|
||||
(10 rows)
|
||||
|
||||
explain (costs off) select /*+ set(partition_page_estimation on)*/* from range_list where month_code = '201902';
|
||||
QUERY PLAN
|
||||
|
||||
@ -272,12 +272,13 @@ CREATE ROW LEVEL SECURITY POLICY p06 ON document_row AS RESTRICTIVE FOR SELECT T
|
||||
Indexes:
|
||||
"document_row_pkey" PRIMARY KEY, btree (did) TABLESPACE pg_default
|
||||
Row Level Security Policies:
|
||||
POLICY "p01"
|
||||
POLICY "p01" FOR ALL
|
||||
TO public
|
||||
USING ((dlevel <= (SELECT account_row.aid FROM account_row WHERE ((account_row.aname)::name = "current_user"()))))
|
||||
POLICY "p02" AS RESTRICTIVE
|
||||
POLICY "p02" AS RESTRICTIVE FOR ALL
|
||||
TO regress_rls_david
|
||||
USING ((cid < 50))
|
||||
POLICY "p03" AS RESTRICTIVE
|
||||
POLICY "p03" AS RESTRICTIVE FOR ALL
|
||||
TO regress_rls_david
|
||||
USING ((cid <> 44))
|
||||
POLICY "p04" AS RESTRICTIVE FOR UPDATE
|
||||
@ -434,27 +435,27 @@ NOTICE: f_leak => regress_rls_bob
|
||||
|
||||
-- EXPLAIN (COSTS OFF, VERBOSE ON) SELECT * FROM document_row INNER JOIN category_row ON document_row.cid=category_row.cid WHERE rls_fleak2(dauthor) ORDER BY did;
|
||||
\d
|
||||
List of relations
|
||||
Schema | Name | Type | Owner | Storage
|
||||
--------------------+----------------+-------+-------------------+--------------------------------------------------------------
|
||||
regress_rls_schema | account_col | table | regress_rls_alice | {orientation=column,compression=low}
|
||||
regress_rls_schema | account_row | table | regress_rls_alice | {orientation=row,compression=no}
|
||||
regress_rls_schema | alice_public_1 | table | regress_rls_alice | {orientation=row,compression=no}
|
||||
regress_rls_schema | category_col | table | regress_rls_alice | {orientation=column,compression=low}
|
||||
regress_rls_schema | category_row | table | regress_rls_alice | {orientation=row,compression=no}
|
||||
regress_rls_schema | document_col | table | regress_rls_alice | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | document_row | table | regress_rls_alice | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | par_col_t1 | table | regress_rls_alice | {orientation=column,compression=low,enable_rowsecurity=true}
|
||||
regress_rls_schema | par_row_t1 | table | regress_rls_alice | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | tt_rep | table | regress_rls_alice | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
List of relations
|
||||
Schema | Name | Type | Owner | Storage
|
||||
--------------------+----------------+-------+-------+--------------------------------------------------------------
|
||||
regress_rls_schema | account_col | table | | {orientation=column,compression=low}
|
||||
regress_rls_schema | account_row | table | | {orientation=row,compression=no}
|
||||
regress_rls_schema | alice_public_1 | table | | {orientation=row,compression=no}
|
||||
regress_rls_schema | category_col | table | | {orientation=column,compression=low}
|
||||
regress_rls_schema | category_row | table | | {orientation=row,compression=no}
|
||||
regress_rls_schema | document_col | table | | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | document_row | table | | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | par_col_t1 | table | | {orientation=column,compression=low,enable_rowsecurity=true}
|
||||
regress_rls_schema | par_row_t1 | table | | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | tt_rep | table | | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
(10 rows)
|
||||
|
||||
\df
|
||||
List of functions
|
||||
Schema | Name | Result data type | Argument data types | Type | fencedmode | propackage
|
||||
--------------------+------------+------------------+---------------------+--------+------------+------------
|
||||
regress_rls_schema | rls_fleak1 | boolean | text | normal | f | f
|
||||
regress_rls_schema | rls_fleak2 | boolean | text | normal | f | f
|
||||
List of functions
|
||||
Schema | Name | Result data type | Argument data types | Type | fencedmode | propackage | prokind
|
||||
--------------------+------------+------------------+---------------------+--------+------------+------------+---------
|
||||
regress_rls_schema | rls_fleak1 | boolean | text | normal | f | f | f
|
||||
regress_rls_schema | rls_fleak2 | boolean | text | normal | f | f | f
|
||||
(2 rows)
|
||||
|
||||
-- viewpoint from regress_rls_peter
|
||||
@ -725,8 +726,10 @@ DELETE FROM document_row WHERE did = 100 RETURNING dauthor, did;
|
||||
-- only owner can change policies
|
||||
ALTER POLICY p01 ON document_row USING (true); --fail
|
||||
ERROR: must be owner of relation document_row
|
||||
DETAIL: N/A
|
||||
DROP POLICY p01 ON document_col; --fail
|
||||
ERROR: must be owner of relation document_col
|
||||
DETAIL: N/A
|
||||
-- check data from partition table
|
||||
SELECT * FROM par_row_t1 WHERE a > 7 ORDER BY 1, 2;
|
||||
id | a | b
|
||||
@ -777,25 +780,25 @@ SELECT COUNT(*) FROM document_row_david;
|
||||
List of relations
|
||||
Schema | Name | Type | Owner | Storage
|
||||
--------------------+--------------------+-------+-------------------+--------------------------------------------------------------
|
||||
regress_rls_schema | account_col | table | regress_rls_alice | {orientation=column,compression=low}
|
||||
regress_rls_schema | account_row | table | regress_rls_alice | {orientation=row,compression=no}
|
||||
regress_rls_schema | alice_public_2 | table | regress_rls_alice | {orientation=row,compression=no}
|
||||
regress_rls_schema | category_col | table | regress_rls_alice | {orientation=column,compression=low}
|
||||
regress_rls_schema | category_row | table | regress_rls_alice | {orientation=row,compression=no}
|
||||
regress_rls_schema | document_col | table | regress_rls_alice | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | document_row | table | regress_rls_alice | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | account_col | table | | {orientation=column,compression=low}
|
||||
regress_rls_schema | account_row | table | | {orientation=row,compression=no}
|
||||
regress_rls_schema | alice_public_2 | table | | {orientation=row,compression=no}
|
||||
regress_rls_schema | category_col | table | | {orientation=column,compression=low}
|
||||
regress_rls_schema | category_row | table | | {orientation=row,compression=no}
|
||||
regress_rls_schema | document_col | table | | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | document_row | table | | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | document_row_david | table | regress_rls_david | {orientation=row,compression=no}
|
||||
regress_rls_schema | par_col_t1 | table | regress_rls_alice | {orientation=column,compression=low,enable_rowsecurity=true}
|
||||
regress_rls_schema | par_row_t1 | table | regress_rls_alice | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | tt_rep | table | regress_rls_alice | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | par_col_t1 | table | | {orientation=column,compression=low,enable_rowsecurity=true}
|
||||
regress_rls_schema | par_row_t1 | table | | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | tt_rep | table | | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
(11 rows)
|
||||
|
||||
\df
|
||||
List of functions
|
||||
Schema | Name | Result data type | Argument data types | Type | fencedmode | propackage
|
||||
--------------------+------------+------------------+---------------------+--------+------------+------------
|
||||
regress_rls_schema | rls_fleak1 | boolean | text | normal | f | f
|
||||
regress_rls_schema | rls_fleak2 | boolean | text | normal | f | f
|
||||
List of functions
|
||||
Schema | Name | Result data type | Argument data types | Type | fencedmode | propackage | prokind
|
||||
--------------------+------------+------------------+---------------------+--------+------------+------------+---------
|
||||
regress_rls_schema | rls_fleak1 | boolean | text | normal | f | f | f
|
||||
regress_rls_schema | rls_fleak2 | boolean | text | normal | f | f | f
|
||||
(2 rows)
|
||||
|
||||
-- change to super user
|
||||
@ -834,10 +837,13 @@ SELECT * FROM pg_rlspolicies ORDER BY tablename, policyname;
|
||||
regress_rls_schema | par_row_t1 | par_row_t1_rls2 | RESTRICTIVE | {regress_rls_group2} | ALL | (id < 30)
|
||||
pg_catalog | pg_attribute | pg_attribute_rls | PERMISSIVE | {public} | SELECT | has_table_privilege("current_user"(), attrelid, 'select'::text)
|
||||
pg_catalog | pg_class | pg_class_rls | PERMISSIVE | {public} | SELECT | has_table_privilege("current_user"(), oid, 'select'::text)
|
||||
pg_catalog | pg_namespace | pg_namespace_rls | PERMISSIVE | {public} | SELECT | has_schema_privilege("current_user"(), oid, 'USAGE'::text)
|
||||
pg_catalog | pg_partition | pg_partition_rls | PERMISSIVE | {public} | SELECT | has_table_privilege("current_user"(), parentid, 'select'::text)
|
||||
pg_catalog | pg_proc | pg_proc_rls | PERMISSIVE | {public} | SELECT | has_function_privilege("current_user"(), oid, 'execute'::text)
|
||||
pg_catalog | pgxc_slice | pgxc_slice_rls | PERMISSIVE | {public} | SELECT | has_table_privilege("current_user"(), relid, 'select'::text)
|
||||
regress_rls_schema | tt_rep | tt_rep_rls1 | PERMISSIVE | {regress_rls_group1} | SELECT | ((name)::name = "current_user"())
|
||||
regress_rls_schema | tt_rep | tt_rep_rls2 | PERMISSIVE | {regress_rls_group2} | SELECT | (id = 1)
|
||||
(17 rows)
|
||||
(20 rows)
|
||||
|
||||
-- enable private object
|
||||
ALTER DATABASE regression DISABLE PRIVATE OBJECT;
|
||||
@ -975,30 +981,30 @@ SELECT * FROM tt_rep;
|
||||
List of relations
|
||||
Schema | Name | Type | Owner | Storage
|
||||
--------------------+--------------------+-------+-------------------+---------------------------------------------------------------------------------
|
||||
regress_rls_schema | account_col | table | regress_rls_alice | {orientation=column,compression=low}
|
||||
regress_rls_schema | account_row | table | regress_rls_alice | {orientation=row,compression=no}
|
||||
regress_rls_schema | alice_private | table | regress_rls_alice | {orientation=row,compression=no}
|
||||
regress_rls_schema | alice_public_1 | table | regress_rls_alice | {orientation=row,compression=no}
|
||||
regress_rls_schema | alice_public_2 | table | regress_rls_alice | {orientation=row,compression=no}
|
||||
regress_rls_schema | category_col | table | regress_rls_alice | {orientation=column,compression=low}
|
||||
regress_rls_schema | category_row | table | regress_rls_alice | {orientation=row,compression=no}
|
||||
regress_rls_schema | document_col | table | regress_rls_alice | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | document_row | table | regress_rls_alice | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | account_col | table | | {orientation=column,compression=low}
|
||||
regress_rls_schema | account_row | table | | {orientation=row,compression=no}
|
||||
regress_rls_schema | alice_private | table | | {orientation=row,compression=no}
|
||||
regress_rls_schema | alice_public_1 | table | | {orientation=row,compression=no}
|
||||
regress_rls_schema | alice_public_2 | table | | {orientation=row,compression=no}
|
||||
regress_rls_schema | category_col | table | | {orientation=column,compression=low}
|
||||
regress_rls_schema | category_row | table | | {orientation=row,compression=no}
|
||||
regress_rls_schema | document_col | table | | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | document_row | table | | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | document_row_david | table | regress_rls_david | {orientation=row,compression=no}
|
||||
regress_rls_schema | inlist_t1 | table | regress_rls_david | {orientation=row,compression=no,enable_rowsecurity=true,force_rowsecurity=true}
|
||||
regress_rls_schema | par_col_t1 | table | regress_rls_alice | {orientation=column,compression=low,enable_rowsecurity=true}
|
||||
regress_rls_schema | par_row_t1 | table | regress_rls_alice | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | tt_rep | table | regress_rls_alice | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | par_col_t1 | table | | {orientation=column,compression=low,enable_rowsecurity=true}
|
||||
regress_rls_schema | par_row_t1 | table | | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | tt_rep | table | | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
(14 rows)
|
||||
|
||||
\df
|
||||
List of functions
|
||||
Schema | Name | Result data type | Argument data types | Type | fencedmode | propackage
|
||||
--------------------+------------------------+------------------+----------------------------+--------+------------+------------
|
||||
regress_rls_schema | rls_auto_create_policy | integer | t_name text, p_num integer | normal | f | f
|
||||
regress_rls_schema | rls_auto_drop_policy | integer | t_name text, p_num integer | normal | f | f
|
||||
regress_rls_schema | rls_fleak1 | boolean | text | normal | f | f
|
||||
regress_rls_schema | rls_fleak2 | boolean | text | normal | f | f
|
||||
List of functions
|
||||
Schema | Name | Result data type | Argument data types | Type | fencedmode | propackage | prokind
|
||||
--------------------+------------------------+------------------+----------------------------+--------+------------+------------+---------
|
||||
regress_rls_schema | rls_auto_create_policy | integer | t_name text, p_num integer | normal | f | f | f
|
||||
regress_rls_schema | rls_auto_drop_policy | integer | t_name text, p_num integer | normal | f | f | f
|
||||
regress_rls_schema | rls_fleak1 | boolean | text | normal | f | f | f
|
||||
regress_rls_schema | rls_fleak2 | boolean | text | normal | f | f | f
|
||||
(4 rows)
|
||||
|
||||
-- viewpoint from regress_rls_alice again
|
||||
@ -1018,8 +1024,8 @@ ALTER TABLE par_row_t1 FORCE ROW LEVEL SECURITY;
|
||||
regress_rls_schema | category_row | table | regress_rls_alice | {orientation=row,compression=no}
|
||||
regress_rls_schema | document_col | table | regress_rls_alice | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | document_row | table | regress_rls_alice | {orientation=row,compression=no,enable_rowsecurity=true}
|
||||
regress_rls_schema | document_row_david | table | regress_rls_david | {orientation=row,compression=no}
|
||||
regress_rls_schema | inlist_t1 | table | regress_rls_david | {orientation=row,compression=no,enable_rowsecurity=true,force_rowsecurity=true}
|
||||
regress_rls_schema | document_row_david | table | | {orientation=row,compression=no}
|
||||
regress_rls_schema | inlist_t1 | table | | {orientation=row,compression=no,enable_rowsecurity=true,force_rowsecurity=true}
|
||||
regress_rls_schema | par_col_t1 | table | regress_rls_alice | {orientation=column,compression=low,enable_rowsecurity=true}
|
||||
regress_rls_schema | par_row_t1 | table | regress_rls_alice | {orientation=row,compression=no,enable_rowsecurity=true,force_rowsecurity=true}
|
||||
regress_rls_schema | tt_rep | table | regress_rls_alice | {orientation=row,compression=no,enable_rowsecurity=true,force_rowsecurity=true}
|
||||
|
||||
@ -7,27 +7,16 @@ return num1+num2;
|
||||
end
|
||||
/
|
||||
grant all on security_t1 to public;
|
||||
ERROR: grant to public operation is forbidden in security mode
|
||||
grant all on security_v1 to public;
|
||||
ERROR: grant to public operation is forbidden in security mode
|
||||
grant all (f1) on table security_t1 to public;
|
||||
ERROR: grant to public operation is forbidden in security mode
|
||||
grant all on schema cstore to public;
|
||||
ERROR: grant to public operation is forbidden in security mode
|
||||
grant all on tablespace pg_global to public;
|
||||
ERROR: grant to public operation is forbidden in security mode
|
||||
grant all on function add_func(num1 int, num2 int) to public;
|
||||
ERROR: grant to public operation is forbidden in security mode
|
||||
grant all on type bool to public;
|
||||
ERROR: grant to public operation is forbidden in security mode
|
||||
grant all on language plpgsql to public;
|
||||
ERROR: grant to public operation is forbidden in security mode
|
||||
grant all on security_t1 to public with grant option;
|
||||
ERROR: WITH GRANT OPTION is not supported in security mode.
|
||||
copy security_t1 to '/temp/copy_error';
|
||||
ERROR: operation copy with file is forbidden in security mode.
|
||||
copy security_t1 from '/temp/copy_error';
|
||||
ERROR: operation copy with file is forbidden in security mode.
|
||||
ERROR: invalid grant operation
|
||||
DETAIL: Grant options can only be granted to roles.
|
||||
drop function add_func(num1 int, num2 int);
|
||||
drop view security_v1;
|
||||
drop table security_t1;
|
||||
|
||||
@ -4,4 +4,4 @@
|
||||
\! @abs_bindir@/gsql -dpostgres -p @portstring@ -c "alter text search configuration tscp_utf8_003 add mapping for zh_words, en_word, multisymbol,numeric, alnum, grapsymbol with simple;";
|
||||
\! @abs_bindir@/gsql -dpostgres -p @portstring@ -c "create index gin_getbitmap_table_idx1 on gin_getbitmap_table using gin(to_tsvector('tscp_utf8_003',c_varchar));";
|
||||
\! @abs_bindir@/gsql -dpostgres -p @portstring@ -c "create index gin_getbitmap_table_idx2 on gin_getbitmap_table using gin(to_tsvector('tscp_utf8_003',c_text));";
|
||||
\! @abs_bindir@/gsql -dpostgres -p @portstring@ -c "select count(*) from gin_getbitmap_table where to_tsvector('tscp_utf8_003',c_text) @@ to_tsquery('tscp_utf8_003','////') and to_tsvector('tscp_utf8_003',c_text) @@ to_tsquery('tscp_utf8_003','\$\$\$\$\$\$') and to_tsvector('tscp_utf8_003',c_text) @@ to_tsquery('tscp_utf8_003','#####') and to_tsvector('tscp_utf8_003',c_text) @@ to_tsquery('tscp_utf8_003','%%%%%') and to_tsvector('tscp_utf8_003',c_text) @@ plainto_tsquery('tscp_utf8_003','……&**%') and to_tsvector('tscp_utf8_003',c_text) @@ plainto_tsquery('tscp_utf8_003',' ') and to_tsvector('tscp_utf8_003',c_text) @@ plainto_tsquery('tscp_utf8_003',' ') order by 1;"
|
||||
\! @abs_bindir@/gsql -dpostgres -p @portstring@ -c "select count(*) from gin_getbitmap_table where to_tsvector('tscp_utf8_003',c_text) @@ to_tsquery('tscp_utf8_003','////') and to_tsvector('tscp_utf8_003',c_text) @@ to_tsquery('tscp_utf8_003','\$\$\$\$\$\$') and to_tsvector('tscp_utf8_003',c_text) @@ to_tsquery('tscp_utf8_003','#####') and to_tsvector('tscp_utf8_003',c_text) @@ to_tsquery('tscp_utf8_003','%%%%%') and to_tsvector('tscp_utf8_003',c_text) @@ plainto_tsquery('tscp_utf8_003','……&**%') and to_tsvector('tscp_utf8_003',c_text) @@ plainto_tsquery('tscp_utf8_003',' ') and to_tsvector('tscp_utf8_003',c_text) @@ plainto_tsquery('tscp_utf8_003',' ') order by 1;"
|
||||
|
||||
@ -4,14 +4,13 @@ CREATE DATABASE db_gin_utf8 TEMPLATE template0 encoding 'UTF8';
|
||||
SET ENABLE_SEQSCAN=OFF;
|
||||
SET ENABLE_INDEXSCAN=OFF;
|
||||
SET ENABLE_BITMAPSCAN=ON;
|
||||
SET ENABLE_FAST_QUERY_SHIPPING=OFF;
|
||||
|
||||
--- import data
|
||||
create table import_data(id int, chepai varchar(10), shenfenzheng varchar(20), duanxin text) distribute by hash (id);
|
||||
create table import_data(id int, chepai varchar(10), shenfenzheng varchar(20), duanxin text);
|
||||
copy import_data from '@abs_srcdir@/data/gin_data_1000.txt';
|
||||
|
||||
--- import data then create index
|
||||
create table gin_test_data(id int, chepai varchar(10), shenfenzheng varchar(20), duanxin text) distribute by hash (id);
|
||||
create table gin_test_data(id int, chepai varchar(10), shenfenzheng varchar(20), duanxin text);
|
||||
insert into gin_test_data select 1, chepai, shenfenzheng, duanxin from import_data;
|
||||
--- 6 times
|
||||
insert into gin_test_data select * from gin_test_data;
|
||||
@ -33,7 +32,7 @@ select count(*) from gin_test_data where to_tsvector('ngram', shenfenzheng) @@ t
|
||||
select count(*) from gin_test_data where to_tsvector('ngram', shenfenzheng) @@ to_tsquery('ngram', '325682195604186793');
|
||||
|
||||
--- gin data page split
|
||||
create table gin_test_data_1(id int, shenfenzheng varchar(20)) distribute by hash (id);
|
||||
create table gin_test_data_1(id int, shenfenzheng varchar(20));
|
||||
insert into gin_test_data_1 select id, shenfenzheng from gin_test_data;
|
||||
--- 7 times
|
||||
insert into gin_test_data_1 select * from gin_test_data_1;
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
-----gs_guc_reload(GUC) set default value of lockwait_timeout by gs_guc reload
|
||||
--set new value
|
||||
\! @abs_bindir@/gs_guc reload -D @abs_srcdir@/tmp_check/datanode1/ -c "lockwait_timeout=1s"
|
||||
\! sleep 10s
|
||||
\! sleep 3s
|
||||
show lockwait_timeout;
|
||||
--no assign value
|
||||
\! @abs_bindir@/gs_guc reload -D @abs_srcdir@/tmp_check/datanode1/ -c "lockwait_timeout"
|
||||
\! sleep 10s
|
||||
\! sleep 3s
|
||||
show lockwait_timeout;
|
||||
|
||||
@ -18,8 +18,7 @@ CREATE TABLE lineitem_with_null
|
||||
, L_SHIPMODE CHAR(10)
|
||||
, L_COMMENT VARCHAR(44)
|
||||
)
|
||||
with (orientation = column)
|
||||
distribute by hash(L_ORDERKEY);
|
||||
with (orientation = column);
|
||||
COPY lineitem_with_null FROM '@abs_srcdir@/data/lineitem.data' with (format 'text', delimiter '|', null '');
|
||||
analyze lineitem_with_null;
|
||||
analyze lineitem_with_null(L_PARTKEY);
|
||||
|
||||
@ -1,25 +1,25 @@
|
||||
create schema cstore_btree_index;
|
||||
set current_schema = cstore_btree_index;
|
||||
---
|
||||
--case 1: unsupported index test
|
||||
---
|
||||
DROP TABLE if exists cstore_insert_t1;
|
||||
DROP TABLE if exists row_table;
|
||||
CREATE TABLE cstore_insert_t1(c1 int, c2 float, c3 text) WITH (orientation = column);
|
||||
COPY cstore_insert_t1 FROM '@abs_srcdir@/data/cstore_copy_t2.data' DELIMITER ',';
|
||||
CREATE UNIQUE INDEX unsupport1_idx ON cstore_insert_t1 using btree(c1);
|
||||
CREATE INDEX CONCURRENTLY unsupport2_idx ON cstore_insert_t1 using btree(c1);
|
||||
CREATE INDEX unsupport3_idx ON cstore_insert_t1 using btree(lower(c2));
|
||||
CREATE INDEX unsupport4_idx ON cstore_insert_t1 using btree(c1) where c1 > 1;
|
||||
CREATE INDEX unsupport5_idx ON cstore_insert_t1 using btree(c2 NULLS FIRST);
|
||||
CREATE UNIQUE INDEX unsupport1_idx ON cstore_insert_t1(c1);
|
||||
CREATE INDEX CONCURRENTLY unsupport2_idx ON cstore_insert_t1(c1);
|
||||
CREATE INDEX unsupport3_idx ON cstore_insert_t1(lower(c2));
|
||||
CREATE INDEX unsupport4_idx ON cstore_insert_t1(c1) where c1 > 1;
|
||||
CREATE INDEX unsupport5_idx ON cstore_insert_t1(c2 NULLS FIRST);
|
||||
CREATE INDEX unsupport6_idx ON cstore_insert_t1 USING hash (c1);
|
||||
CREATE INDEX unsupport7_idx ON cstore_insert_t1 USING gist (c1);
|
||||
CREATE INDEX unsupport9_idx ON cstore_insert_t1 USING spgist (c1);
|
||||
CREATE INDEX unsupport10_idx ON cstore_insert_t1 USING btree (c1);
|
||||
COPY cstore_insert_t1 FROM '@abs_srcdir@/data/cstore_copy_t2.data' DELIMITER ',';
|
||||
DROP TABLE cstore_insert_t1;
|
||||
DROP TABLE if exists cstore_insert_t1;
|
||||
|
||||
CREATE TABLE row_table(c1 int, c2 float, c3 text);
|
||||
CREATE INDEX unsupport11_idx ON row_table USING psort (c1);
|
||||
DROP TABLE row_table;
|
||||
DROP TABLE if exists row_table;
|
||||
|
||||
-----------
|
||||
---case 2: partition table create index test
|
||||
@ -45,7 +45,7 @@ CREATE TABLE LINEITEM
|
||||
--, primary key (L_ORDERKEY, L_LINENUMBER)
|
||||
)
|
||||
with (orientation = column)
|
||||
distribute by hash(L_ORDERKEY)
|
||||
|
||||
PARTITION BY RANGE(L_SHIPDATE)
|
||||
(
|
||||
PARTITION p1 VALUES LESS THAN('1993-01-01 00:00:00'),
|
||||
@ -57,51 +57,43 @@ PARTITION BY RANGE(L_SHIPDATE)
|
||||
PARTITION p7 VALUES LESS THAN('2030-01-01 00:00:00')
|
||||
);
|
||||
COPY LINEITEM FROM '@abs_srcdir@/data/lineitem_index.data' DELIMITER '|';
|
||||
create index idx1 on lineitem using btree(L_ORDERKEY) local;
|
||||
create index idx2 on lineitem using btree(L_PARTKEY) local;
|
||||
create index idx3 on lineitem using btree(L_LINENUMBER, L_SHIPDATE) local;
|
||||
create index idx4 on lineitem using btree(L_RETURNFLAG) local;
|
||||
create index idx5 on lineitem using btree(L_LINESTATUS, L_SHIPINSTRUCT) local;
|
||||
create index idx1 on lineitem(L_ORDERKEY) local;
|
||||
create index idx2 on lineitem(L_PARTKEY) local;
|
||||
create index idx3 on lineitem(L_LINENUMBER, L_SHIPDATE) local;
|
||||
create index idx4 on lineitem(L_RETURNFLAG) local;
|
||||
create index idx5 on lineitem(L_LINESTATUS, L_SHIPINSTRUCT) local;
|
||||
COPY LINEITEM FROM '@abs_srcdir@/data/lineitem_index.data' DELIMITER '|';
|
||||
set enable_bitmapscan=off;
|
||||
set enable_seqscan=off;
|
||||
select count(*) from lineitem where L_ORDERKEY > 100 and L_ORDERKEY < 200;
|
||||
truncate table lineitem;
|
||||
drop index idx1;
|
||||
drop index idx2;
|
||||
drop index idx3;
|
||||
drop index idx4;
|
||||
drop index idx5;
|
||||
drop table lineitem;
|
||||
drop index if exists idx1;
|
||||
drop index if exists idx2;
|
||||
drop index if exists idx3;
|
||||
drop index if exists idx4;
|
||||
drop index if exists idx5;
|
||||
drop table if exists lineitem;
|
||||
|
||||
----
|
||||
--case 3: check reserve column
|
||||
----
|
||||
CREATE TABLE check_column(id int, tid int);
|
||||
CREATE TABLE check_column(id int, tid_test int, ti int);
|
||||
ALTER TABLE check_column ADD COLUMN tid int;
|
||||
drop table if exists check_column;
|
||||
|
||||
-------
|
||||
--- case 8: index scan with none partition hit
|
||||
-------
|
||||
CREATE TABLE partition_none (
|
||||
a1 character varying(1000),
|
||||
a2 integer,
|
||||
a3 character varying(1000),
|
||||
a4 integer,
|
||||
a5 character varying(1000),
|
||||
a6 integer,
|
||||
a7 character varying(1000),
|
||||
a8 integer,
|
||||
a9 character varying(1000),
|
||||
a10 integer
|
||||
)
|
||||
WITH (orientation=column)
|
||||
DISTRIBUTE BY HASH (a4)
|
||||
PARTITION BY RANGE (a2)
|
||||
(
|
||||
PARTITION p1 VALUES LESS THAN (1),
|
||||
PARTITION p50001 VALUES LESS THAN (50001),
|
||||
PARTITION p100001 VALUES LESS THAN (100001),
|
||||
PARTITION p150001 VALUES LESS THAN (150001),
|
||||
PARTITION p200001 VALUES LESS THAN (200001),
|
||||
PARTITION p250001 VALUES LESS THAN (250001));
|
||||
create index aii on partition_none using btree(a9) local;
|
||||
SELECT a1, a9 FROM /*TaRgET*/ partition_none WHERE a5='ata l' AND 6793839=a2 AND a2=6159730 AND a9='da' ORDER BY a1, a9;
|
||||
drop table partition_none;
|
||||
-----
|
||||
--- case 6: truncate and delete cstore relation with index
|
||||
-----
|
||||
create table IDEX_PARTITION_TABLE_001(COL_INT int) with(orientation=column);
|
||||
CREATE INDEX STORAGE_IDEX_PARTITION_IDEX_001 ON IDEX_PARTITION_TABLE_001(COL_INT);
|
||||
insert into IDEX_PARTITION_TABLE_001 values(1000);
|
||||
truncate table IDEX_PARTITION_TABLE_001;
|
||||
select * from IDEX_PARTITION_TABLE_001;
|
||||
|
||||
insert into IDEX_PARTITION_TABLE_001 values(1000);
|
||||
delete from IDEX_PARTITION_TABLE_001 where col_int=1000;
|
||||
select * from IDEX_PARTITION_TABLE_001 where col_int=1000;
|
||||
|
||||
drop table if exists IDEX_PARTITION_TABLE_001;
|
||||
|
||||
drop schema cstore_btree_index cascade;
|
||||
|
||||
@ -23,7 +23,7 @@ create table row_index_tbl(
|
||||
,num2 decimal
|
||||
,serial1 int
|
||||
,interval1 interval
|
||||
,interval2 tinterval) distribute by hash(id2);
|
||||
,interval2 tinterval);
|
||||
|
||||
insert into row_index_tbl values(10,400,2000,40000,1,111111,1.1,'a','aa','bb','cc','dd','ff','1996-02-12','1984-2-6 01:00:30+8','02:05:36',30.12,0.03,2147483647,'2 day 13:34:56','["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]');
|
||||
insert into row_index_tbl values(20,300,3000,10000,2,222222,2.2,'b','ee','cc','dd','aa','hh','1998-03-24','1986-2-6 03:00:30+8','04:36:25',20.15,0.06,-2147483647,'1 day 18:34:56','["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]');
|
||||
@ -51,43 +51,43 @@ create table cstore_index_tbl(
|
||||
,num2 decimal
|
||||
,serial1 int
|
||||
,interval1 interval
|
||||
,interval2 tinterval)with(orientation=column) distribute by hash(id2);
|
||||
,interval2 tinterval)with(orientation=column);
|
||||
|
||||
insert into cstore_index_tbl select * from row_index_tbl;
|
||||
select ctid from cstore_index_tbl order by 1;
|
||||
|
||||
create index idx_int1 on cstore_index_tbl using btree(id1);
|
||||
create index idx_int2 on cstore_index_tbl using btree(id2);
|
||||
create index idx_int4 on cstore_index_tbl using btree(id4);
|
||||
create index idx_int8 on cstore_index_tbl using btree(id8);
|
||||
create index idx_int on cstore_index_tbl using btree(int1);
|
||||
create index idx_bigint on cstore_index_tbl using btree(bint);
|
||||
create index idx_float on cstore_index_tbl using btree(flag);
|
||||
create index idx_varchar on cstore_index_tbl using btree(name1);
|
||||
create index idx_varchar2 on cstore_index_tbl using btree(name2);
|
||||
create index idx_nvarchar2 on cstore_index_tbl using btree(name3);
|
||||
create index idx_text on cstore_index_tbl using btree(name4);
|
||||
create index idx_date on cstore_index_tbl using btree(time1);
|
||||
create index idx_timetz on cstore_index_tbl using btree(time2);
|
||||
create index idx_time on cstore_index_tbl using btree(time3);
|
||||
create index idx_float8 on cstore_index_tbl using btree(num1);
|
||||
create index idx_decimal on cstore_index_tbl using btree(num2);
|
||||
create index idx_serial on cstore_index_tbl using btree(serial1);
|
||||
create index idx_interval on cstore_index_tbl using btree(interval1);
|
||||
create index idx_tinterval on cstore_index_tbl using btree(interval2);
|
||||
create index idx_int1 on cstore_index_tbl(id1);
|
||||
create index idx_int2 on cstore_index_tbl(id2);
|
||||
create index idx_int4 on cstore_index_tbl(id4);
|
||||
create index idx_int8 on cstore_index_tbl(id8);
|
||||
create index idx_int on cstore_index_tbl(int1);
|
||||
create index idx_bigint on cstore_index_tbl(bint);
|
||||
create index idx_float on cstore_index_tbl(flag);
|
||||
create index idx_varchar on cstore_index_tbl(name1);
|
||||
create index idx_varchar2 on cstore_index_tbl(name2);
|
||||
create index idx_nvarchar2 on cstore_index_tbl(name3);
|
||||
create index idx_text on cstore_index_tbl(name4);
|
||||
create index idx_date on cstore_index_tbl(time1);
|
||||
create index idx_timetz on cstore_index_tbl(time2);
|
||||
create index idx_time on cstore_index_tbl(time3);
|
||||
create index idx_float8 on cstore_index_tbl(num1);
|
||||
create index idx_decimal on cstore_index_tbl(num2);
|
||||
create index idx_serial on cstore_index_tbl(serial1);
|
||||
create index idx_interval on cstore_index_tbl(interval1);
|
||||
create index idx_tinterval on cstore_index_tbl(interval2);
|
||||
|
||||
create index idx_id4_name1 on cstore_index_tbl using btree(id4,name1);
|
||||
create index idx_id4_name2 on cstore_index_tbl using btree(id4,name2);
|
||||
create index idx_id4_name3 on cstore_index_tbl using btree(id4,name3);
|
||||
create index idx_id4_name4 on cstore_index_tbl using btree(id4,name4);
|
||||
create index idx_bint_flag on cstore_index_tbl using btree(bint,flag);
|
||||
create index idx_int1_time on cstore_index_tbl using btree(int1,time3);
|
||||
create index idx_time1_name2 on cstore_index_tbl using btree(time1,name2);
|
||||
create index idx_id4_time2 on cstore_index_tbl using btree(id4,time2);
|
||||
create index idx_num1_time2 on cstore_index_tbl using btree(num1,time2);
|
||||
create index idx_id4_num2 on cstore_index_tbl using btree(id4,num2);
|
||||
create index idx_name1_name2 on cstore_index_tbl using btree(name1,name2);
|
||||
create index idx_time1_interval1 on cstore_index_tbl using btree(time1,interval1);
|
||||
create index idx_id4_name1 on cstore_index_tbl(id4,name1);
|
||||
create index idx_id4_name2 on cstore_index_tbl(id4,name2);
|
||||
create index idx_id4_name3 on cstore_index_tbl(id4,name3);
|
||||
create index idx_id4_name4 on cstore_index_tbl(id4,name4);
|
||||
create index idx_bint_flag on cstore_index_tbl(bint,flag);
|
||||
create index idx_int1_time on cstore_index_tbl(int1,time3);
|
||||
create index idx_time1_name2 on cstore_index_tbl(time1,name2);
|
||||
create index idx_id4_time2 on cstore_index_tbl(id4,time2);
|
||||
create index idx_num1_time2 on cstore_index_tbl(num1,time2);
|
||||
create index idx_id4_num2 on cstore_index_tbl(id4,num2);
|
||||
create index idx_name1_name2 on cstore_index_tbl(name1,name2);
|
||||
create index idx_time1_interval1 on cstore_index_tbl(time1,interval1);
|
||||
|
||||
set enable_seqscan=off;
|
||||
|
||||
@ -177,41 +177,54 @@ drop index idx_int2;
|
||||
drop table row_index_tbl;
|
||||
drop table cstore_index_tbl;
|
||||
|
||||
-----
|
||||
--- case 6: truncate and delete cstore relation with index
|
||||
-----
|
||||
create table IDEX_PARTITION_TABLE_001(COL_INT int) with(orientation=column);
|
||||
CREATE INDEX STORAGE_IDEX_PARTITION_IDEX_001 ON IDEX_PARTITION_TABLE_001 using btree(COL_INT);
|
||||
insert into IDEX_PARTITION_TABLE_001 values(1000);
|
||||
truncate table IDEX_PARTITION_TABLE_001;
|
||||
select * from IDEX_PARTITION_TABLE_001;
|
||||
|
||||
insert into IDEX_PARTITION_TABLE_001 values(1000);
|
||||
delete from IDEX_PARTITION_TABLE_001 where col_int=1000;
|
||||
select * from IDEX_PARTITION_TABLE_001 where col_int=1000;
|
||||
|
||||
drop table IDEX_PARTITION_TABLE_001;
|
||||
|
||||
----
|
||||
--- case 7: two indexes with the same column
|
||||
----
|
||||
create table row_index_tbl(c1 int,c2 int,c3 int) distribute by hash(c1);
|
||||
create table row_index_tbl(c1 int,c2 int,c3 int) ;
|
||||
|
||||
insert into row_index_tbl values(0,1,2);
|
||||
insert into row_index_tbl values(3,4,5);
|
||||
insert into row_index_tbl values(6,7,8);
|
||||
insert into row_index_tbl values(9,10,11);
|
||||
|
||||
create table cstore_index_tbl(c1 int,c2 int,c3 int) with (orientation = column) distribute by hash(c1);
|
||||
create table cstore_index_tbl(c1 int,c2 int,c3 int) with (orientation = column) ;
|
||||
insert into cstore_index_tbl select * from row_index_tbl;
|
||||
|
||||
create index idx_c2 on cstore_index_tbl using btree(c2);
|
||||
create index idx_c2 on cstore_index_tbl(c2);
|
||||
|
||||
explain (verbose on, costs off) SELECT c2 FROM cstore_index_tbl WHERE c2 > 2 and c2 < 9;
|
||||
SELECT c2 FROM cstore_index_tbl WHERE c2 > 2 and c2 < 9 order by c2;
|
||||
drop table row_index_tbl;
|
||||
drop table cstore_index_tbl;
|
||||
|
||||
-------
|
||||
--- case 8: index scan with none partition hit
|
||||
-------
|
||||
CREATE TABLE partition_none (
|
||||
a1 character varying(1000),
|
||||
a2 integer,
|
||||
a3 character varying(1000),
|
||||
a4 integer,
|
||||
a5 character varying(1000),
|
||||
a6 integer,
|
||||
a7 character varying(1000),
|
||||
a8 integer,
|
||||
a9 character varying(1000),
|
||||
a10 integer
|
||||
)
|
||||
WITH (orientation=column)
|
||||
PARTITION BY RANGE (a2)
|
||||
(
|
||||
PARTITION p1 VALUES LESS THAN (1),
|
||||
PARTITION p50001 VALUES LESS THAN (50001),
|
||||
PARTITION p100001 VALUES LESS THAN (100001),
|
||||
PARTITION p150001 VALUES LESS THAN (150001),
|
||||
PARTITION p200001 VALUES LESS THAN (200001),
|
||||
PARTITION p250001 VALUES LESS THAN (250001));
|
||||
create index aii on partition_none(a9) local;
|
||||
SELECT a1, a9 FROM /*TaRgET*/ partition_none WHERE a5='ata l' AND 6793839=a2 AND a2=6159730 AND a9='da' ORDER BY a1, a9;
|
||||
drop table partition_none;
|
||||
|
||||
----
|
||||
--- case 9: index scan with partition number be zero
|
||||
@ -232,80 +245,9 @@ PARTITION BY RANGE(c_date_1)
|
||||
PARTITION COMPRESS_TABLE_INTEVAL_1 VALUES LESS THAN('2012-8-23')
|
||||
);
|
||||
|
||||
CREATE INDEX INDEX_COMPRESS_1 ON COMPRESS_TABLE_INDEX using btree(C_INT_2) LOCAL;
|
||||
CREATE INDEX INDEX_COMPRESS_2 ON COMPRESS_TABLE_INDEX using btree(C_DATE_1) LOCAL;
|
||||
CREATE INDEX INDEX_COMPRESS_3 ON COMPRESS_TABLE_INDEX using btree(C_INT_1) LOCAL;
|
||||
CREATE INDEX INDEX_COMPRESS_1 ON COMPRESS_TABLE_INDEX(C_INT_2) LOCAL;
|
||||
CREATE INDEX INDEX_COMPRESS_2 ON COMPRESS_TABLE_INDEX(C_DATE_1) LOCAL;
|
||||
CREATE INDEX INDEX_COMPRESS_3 ON COMPRESS_TABLE_INDEX(C_INT_1) LOCAL;
|
||||
|
||||
SELECT COUNT(*) FROM COMPRESS_TABLE_INDEX WHERE C_DATE_1>='2012-09-01' AND C_DATE_1<'2012-9-20';
|
||||
drop table COMPRESS_TABLE_INDEX;
|
||||
|
||||
----
|
||||
--- case 10:index scan with qual push down
|
||||
----
|
||||
set datestyle to iso;
|
||||
SET IntervalStyle to postgres;
|
||||
set time zone PRC;
|
||||
CREATE TABLE PARTITION_SELECT_PICT_TABLE(
|
||||
C_CHAR_3 CHAR(102400),
|
||||
C_VARCHAR_3 VARCHAR(1024),
|
||||
C_INT INTEGER,
|
||||
C_NUMERIC numeric(10,5),
|
||||
C_TS_WITHOUT TIMESTAMP WITHOUT TIME ZONE)
|
||||
DISTRIBUTE BY HASH(C_CHAR_3)
|
||||
partition by range (C_CHAR_3,C_VARCHAR_3,C_INT,C_TS_WITHOUT)
|
||||
(
|
||||
partition PARTITION_SELECT_PICT_1 values less than ('DEFGHIJ', 'defghij', 444, '2000-04-04 04:04:04'),
|
||||
partition PARTITION_SELECT_PICT_2 values less than ('GHIJKLM', 'ghijklm', 777, '2000-07-07 07:07:07'),
|
||||
partition PARTITION_SELECT_PICT_3 values less than ('MJKLMNO', 'ijklmno', 999, '2000-09-09 09:09:09')
|
||||
);
|
||||
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('ABCDEFG','abcdefg',111,111.1,'2000-01-01 01:01:01');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('BCDEFGH','bcdefgh',222,222.2,'2000-02-02 02:02:02');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('CDEFGHI','cdefghi',333,333.3,'2000-03-03 03:03:03');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('DEFGHIJ','defghij',444,444.4,'2000-04-04 04:04:04');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('EFGHIJK','efghijk',555,555.5,'2000-05-05 05:05:05');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('FGHIJKL','fghijkl',666,666.6,'2000-06-06 06:06:06');
|
||||
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('ABCDEFG',null,111,111.1,'2000-01-01 01:01:01');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('ABCDEFG',null,null,null,null);
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('ABCDEFG','abcdefg',null,111.1,'2000-01-01 01:01:01');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('BCDEFGH','bcdefgh',null,null,'2000-02-02 02:02:02');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('BCDEFGH',null,222,null,'2000-02-02 02:02:02');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('CDEFGHI','cdefghi',333,null,'2000-03-03 03:03:03');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('EFGHIJK',null,null,555.5,'2000-05-05 05:05:05');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('FGHIJKL','fghijkl',null,null,null);
|
||||
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('A'||generate_series(1,5),'a'||generate_series(1,5),generate_series(1,5),cast( generate_series(1,5)||'.111' as numeric(10,5)),cast('2000-01-'||generate_series(1,5)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('B'||generate_series(101,103),'b'||generate_series(101,103),generate_series(101,103),cast(generate_series(101,103)||'.111' as numeric(10,5)),cast('2000-02-'||generate_series(1,3)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('C'||generate_series(201,205),'c'||generate_series(201,205),generate_series(201,205),cast(generate_series(201,205)||'.111' as numeric(10,5)),cast('2000-03-'||generate_series(1,5)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('D'||generate_series(301,303),'d'||generate_series(301,303),generate_series(301,303),cast(generate_series(301,303)||'.111' as numeric(10,5)),cast('2000-04-'||generate_series(1,3)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('DE'||generate_series(401,405),'de'||generate_series(401,405),generate_series(401,405),cast(generate_series(401,405)||'.111' as numeric(10,5)),cast('2000-05-'||generate_series(1,5)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('E'||generate_series(501,504),'e'||generate_series(501,504),generate_series(501,504),cast( generate_series(501,504)||'.222' as numeric(10,5)),cast('2000-01-'||generate_series(1,4)||' 13:13:13' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('F'||generate_series(601,603),'f'||generate_series(601,603),generate_series(601,603),cast(generate_series(601,603)||'.222' as numeric(10,5)),cast('2000-02-'||generate_series(1,3)||' 13:13:13' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('G'||generate_series(701,705),'g'||generate_series(701,705),generate_series(701,705),cast(generate_series(701,705)||'.222' as numeric(10,5)),cast('2000-03-'||generate_series(1,5)||' 13:13:13' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('GH'||generate_series(801,803),'gh'||generate_series(801,803),generate_series(801,803),cast(generate_series(801,803)||'.222' as numeric(10,5)),cast('2000-04-'||generate_series(1,3)||' 13:13:13' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
|
||||
|
||||
CREATE TABLE VECTOR_PARTITION_SELECT_PICT_TABLE(
|
||||
C_CHAR_3 CHAR(102400),
|
||||
C_VARCHAR_3 VARCHAR(1024),
|
||||
C_INT INTEGER,
|
||||
C_NUMERIC numeric(10,5),
|
||||
C_TS_WITHOUT TIMESTAMP WITHOUT TIME ZONE) with (orientation = column)
|
||||
DISTRIBUTE BY HASH(C_CHAR_3)
|
||||
partition by range (C_CHAR_3,C_VARCHAR_3,C_INT,C_TS_WITHOUT)
|
||||
(
|
||||
partition PARTITION_SELECT_PICT_1 values less than ('DEFGHIJ', 'defghij', 444, '2000-04-04 04:04:04'),
|
||||
partition PARTITION_SELECT_PICT_2 values less than ('GHIJKLM', 'ghijklm', 777, '2000-07-07 07:07:07'),
|
||||
partition PARTITION_SELECT_PICT_3 values less than ('MJKLMNO', 'ijklmno', 999, '2000-09-09 09:09:09')
|
||||
);
|
||||
|
||||
insert into VECTOR_PARTITION_SELECT_PICT_TABLE select * from PARTITION_SELECT_PICT_TABLE;
|
||||
|
||||
create index PARTITION_SELECT_PICT_INDEX_1 ON VECTOR_PARTITION_SELECT_PICT_TABLE using btree(C_CHAR_3,C_VARCHAR_3,C_INT,C_NUMERIC,C_TS_WITHOUT) local(PARTITION PARTITION_SELECT_PICT_1, PARTITION PARTITION_SELECT_PICT_2, PARTITION PARTITION_SELECT_PICT_3);
|
||||
create index PARTITION_SELECT_PICT_INDEX_2 ON VECTOR_PARTITION_SELECT_PICT_TABLE using btree(C_CHAR_3,C_VARCHAR_3,C_INT,C_TS_WITHOUT) local(PARTITION PARTITION_SELECT_PICT_1, PARTITION PARTITION_SELECT_PICT_2, PARTITION PARTITION_SELECT_PICT_3);
|
||||
create index PARTITION_SELECT_PICT_INDEX_3 ON VECTOR_PARTITION_SELECT_PICT_TABLE using btree(C_CHAR_3,C_INT,C_TS_WITHOUT) local(PARTITION PARTITION_SELECT_PICT_1, PARTITION PARTITION_SELECT_PICT_2, PARTITION PARTITION_SELECT_PICT_3);
|
||||
|
||||
SELECT trim(C_CHAR_3) , trim(C_VARCHAR_3) , C_INT , C_NUMERIC , C_TS_WITHOUT , lower(trim(C_CHAR_3)) , initcap(trim(C_VARCHAR_3)) , abs(C_INT) , abs(C_NUMERIC) , extract(year from C_TS_WITHOUT) FROM VECTOR_PARTITION_SELECT_PICT_TABLE partition(PARTITION_SELECT_PICT_1) where 'a' not like C_VARCHAR_3 and 1000 != C_INT and C_NUMERIC is not null and (C_TS_WITHOUT >= '2000-01-01 01:01:01' and C_TS_WITHOUT <= '2000-09-09 09:09:09') ORDER BY 1 , 2 , 3 , 4 , 5 ;
|
||||
drop table PARTITION_SELECT_PICT_TABLE;
|
||||
drop table VECTOR_PARTITION_SELECT_PICT_TABLE;
|
||||
@ -1,18 +1,80 @@
|
||||
create schema cstore_btree_index2;
|
||||
set current_schema = cstore_btree_index2;
|
||||
----
|
||||
--case 3: check reserve column
|
||||
--- case 10:index scan with qual push down
|
||||
----
|
||||
CREATE TABLE check_column(id int, tid int);
|
||||
CREATE TABLE check_column(id int);
|
||||
ALTER TABLE check_column ADD COLUMN tid int;
|
||||
set datestyle to iso;
|
||||
SET IntervalStyle to postgres;
|
||||
set time zone PRC;
|
||||
CREATE TABLE PARTITION_SELECT_PICT_TABLE(
|
||||
C_CHAR_3 CHAR(102400),
|
||||
C_VARCHAR_3 VARCHAR(1024),
|
||||
C_INT INTEGER,
|
||||
C_NUMERIC numeric(10,5),
|
||||
C_TS_WITHOUT TIMESTAMP WITHOUT TIME ZONE)
|
||||
|
||||
CREATE TABLE row_tbl_for_gin_idx(c_id tsvector ,c_d_id tsvector) DISTRIBUTE BY REPLICATION;
|
||||
partition by range (C_CHAR_3,C_VARCHAR_3,C_INT,C_TS_WITHOUT)
|
||||
(
|
||||
partition PARTITION_SELECT_PICT_1 values less than ('DEFGHIJ', 'defghij', 444, '2000-04-04 04:04:04'),
|
||||
partition PARTITION_SELECT_PICT_2 values less than ('GHIJKLM', 'ghijklm', 777, '2000-07-07 07:07:07'),
|
||||
partition PARTITION_SELECT_PICT_3 values less than ('MJKLMNO', 'ijklmno', 999, '2000-09-09 09:09:09')
|
||||
);
|
||||
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('ABCDEFG','abcdefg',111,111.1,'2000-01-01 01:01:01');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('BCDEFGH','bcdefgh',222,222.2,'2000-02-02 02:02:02');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('CDEFGHI','cdefghi',333,333.3,'2000-03-03 03:03:03');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('DEFGHIJ','defghij',444,444.4,'2000-04-04 04:04:04');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('EFGHIJK','efghijk',555,555.5,'2000-05-05 05:05:05');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('FGHIJKL','fghijkl',666,666.6,'2000-06-06 06:06:06');
|
||||
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('ABCDEFG',null,111,111.1,'2000-01-01 01:01:01');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('ABCDEFG',null,null,null,null);
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('ABCDEFG','abcdefg',null,111.1,'2000-01-01 01:01:01');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('BCDEFGH','bcdefgh',null,null,'2000-02-02 02:02:02');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('BCDEFGH',null,222,null,'2000-02-02 02:02:02');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('CDEFGHI','cdefghi',333,null,'2000-03-03 03:03:03');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('EFGHIJK',null,null,555.5,'2000-05-05 05:05:05');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('FGHIJKL','fghijkl',null,null,null);
|
||||
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('A'||generate_series(1,5),'a'||generate_series(1,5),generate_series(1,5),cast( generate_series(1,5)||'.111' as numeric(10,5)),cast('2000-01-'||generate_series(1,5)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('B'||generate_series(101,103),'b'||generate_series(101,103),generate_series(101,103),cast(generate_series(101,103)||'.111' as numeric(10,5)),cast('2000-02-'||generate_series(1,3)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('C'||generate_series(201,205),'c'||generate_series(201,205),generate_series(201,205),cast(generate_series(201,205)||'.111' as numeric(10,5)),cast('2000-03-'||generate_series(1,5)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('D'||generate_series(301,303),'d'||generate_series(301,303),generate_series(301,303),cast(generate_series(301,303)||'.111' as numeric(10,5)),cast('2000-04-'||generate_series(1,3)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('DE'||generate_series(401,405),'de'||generate_series(401,405),generate_series(401,405),cast(generate_series(401,405)||'.111' as numeric(10,5)),cast('2000-05-'||generate_series(1,5)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('E'||generate_series(501,504),'e'||generate_series(501,504),generate_series(501,504),cast( generate_series(501,504)||'.222' as numeric(10,5)),cast('2000-01-'||generate_series(1,4)||' 13:13:13' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('F'||generate_series(601,603),'f'||generate_series(601,603),generate_series(601,603),cast(generate_series(601,603)||'.222' as numeric(10,5)),cast('2000-02-'||generate_series(1,3)||' 13:13:13' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('G'||generate_series(701,705),'g'||generate_series(701,705),generate_series(701,705),cast(generate_series(701,705)||'.222' as numeric(10,5)),cast('2000-03-'||generate_series(1,5)||' 13:13:13' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('GH'||generate_series(801,803),'gh'||generate_series(801,803),generate_series(801,803),cast(generate_series(801,803)||'.222' as numeric(10,5)),cast('2000-04-'||generate_series(1,3)||' 13:13:13' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
|
||||
|
||||
CREATE TABLE VECTOR_PARTITION_SELECT_PICT_TABLE(
|
||||
C_CHAR_3 CHAR(102400),
|
||||
C_VARCHAR_3 VARCHAR(1024),
|
||||
C_INT INTEGER,
|
||||
C_NUMERIC numeric(10,5),
|
||||
C_TS_WITHOUT TIMESTAMP WITHOUT TIME ZONE) with (orientation = column)
|
||||
|
||||
partition by range (C_CHAR_3,C_VARCHAR_3,C_INT,C_TS_WITHOUT)
|
||||
(
|
||||
partition PARTITION_SELECT_PICT_1 values less than ('DEFGHIJ', 'defghij', 444, '2000-04-04 04:04:04'),
|
||||
partition PARTITION_SELECT_PICT_2 values less than ('GHIJKLM', 'ghijklm', 777, '2000-07-07 07:07:07'),
|
||||
partition PARTITION_SELECT_PICT_3 values less than ('MJKLMNO', 'ijklmno', 999, '2000-09-09 09:09:09')
|
||||
);
|
||||
|
||||
insert into VECTOR_PARTITION_SELECT_PICT_TABLE select * from PARTITION_SELECT_PICT_TABLE;
|
||||
|
||||
create index PARTITION_SELECT_PICT_INDEX_1 ON VECTOR_PARTITION_SELECT_PICT_TABLE(C_CHAR_3,C_VARCHAR_3,C_INT,C_NUMERIC,C_TS_WITHOUT) local(PARTITION PARTITION_SELECT_PICT_1, PARTITION PARTITION_SELECT_PICT_2, PARTITION PARTITION_SELECT_PICT_3);
|
||||
create index PARTITION_SELECT_PICT_INDEX_2 ON VECTOR_PARTITION_SELECT_PICT_TABLE(C_CHAR_3,C_VARCHAR_3,C_INT,C_TS_WITHOUT) local(PARTITION PARTITION_SELECT_PICT_1, PARTITION PARTITION_SELECT_PICT_2, PARTITION PARTITION_SELECT_PICT_3);
|
||||
create index PARTITION_SELECT_PICT_INDEX_3 ON VECTOR_PARTITION_SELECT_PICT_TABLE(C_CHAR_3,C_INT,C_TS_WITHOUT) local(PARTITION PARTITION_SELECT_PICT_1, PARTITION PARTITION_SELECT_PICT_2, PARTITION PARTITION_SELECT_PICT_3);
|
||||
|
||||
SELECT trim(C_CHAR_3) , trim(C_VARCHAR_3) , C_INT , C_NUMERIC , C_TS_WITHOUT , lower(trim(C_CHAR_3)) , initcap(trim(C_VARCHAR_3)) , abs(C_INT) , abs(C_NUMERIC) , extract(year from C_TS_WITHOUT) FROM VECTOR_PARTITION_SELECT_PICT_TABLE partition(PARTITION_SELECT_PICT_1) where 'a' not like C_VARCHAR_3 and 1000 != C_INT and C_NUMERIC is not null and (C_TS_WITHOUT >= '2000-01-01 01:01:01' and C_TS_WITHOUT <= '2000-09-09 09:09:09') ORDER BY 1 , 2 , 3 , 4 , 5 ;
|
||||
drop table PARTITION_SELECT_PICT_TABLE;
|
||||
drop table VECTOR_PARTITION_SELECT_PICT_TABLE;
|
||||
|
||||
CREATE TABLE row_tbl_for_gin_idx(c_id tsvector ,c_d_id tsvector) ;
|
||||
CREATE INDEX ginidx_for_rowtbl ON row_tbl_for_gin_idx USING GIN(c_id,c_d_id) WITH (FASTUPDATE = OFF);
|
||||
|
||||
-- test storage parameters for index normal-relation
|
||||
CREATE TABLE heaptbl_idxstorage ( a int, b int , c int ) with ( orientation = column );
|
||||
CREATE INDEX idx00_heaptbl_idxstorage ON heaptbl_idxstorage using btree(b) with (max_batchrow = 20000, partial_cluster_rows = 720000, deltarow_threshold = 2000 );
|
||||
CREATE INDEX idx00_heaptbl_idxstorage ON heaptbl_idxstorage(b) with (max_batchrow = 20000, partial_cluster_rows = 720000, deltarow_threshold = 2000 );
|
||||
SELECT relam, relkind, reloptions FROM pg_class WHERE relname = 'idx00_heaptbl_idxstorage';
|
||||
SELECT reloptions FROM pg_class WHERE oid = (SELECT relcudescrelid FROM pg_class WHERE relname = 'idx00_heaptbl_idxstorage');
|
||||
ALTER INDEX idx00_heaptbl_idxstorage SET (max_batchrow = 40000, partial_cluster_rows = 920000, deltarow_threshold = 4000 );
|
||||
@ -21,7 +83,7 @@ SELECT reloptions FROM pg_class WHERE oid = (SELECT relcudescrelid FROM pg_class
|
||||
-- test storage parameters for index partition-relation
|
||||
CREATE TABLE parttbl_idxstorage ( a int, b int , c int ) with ( orientation = column )
|
||||
partition by range(b) (partition p1 values less than (10), partition p2 values less than (100));
|
||||
CREATE INDEX idx00_parttbl_idxstorage ON parttbl_idxstorage using btree(c) local with (max_batchrow = 20000, partial_cluster_rows = 720000, deltarow_threshold = 2000 );
|
||||
CREATE INDEX idx00_parttbl_idxstorage ON parttbl_idxstorage(c) local with (max_batchrow = 20000, partial_cluster_rows = 720000, deltarow_threshold = 2000 );
|
||||
SELECT relam, relkind, reloptions FROM pg_class WHERE relname = 'idx00_parttbl_idxstorage';
|
||||
SELECT reloptions FROM pg_class WHERE oid in (
|
||||
SELECT relcudescrelid from pg_partition where parentid = (SELECT oid FROM pg_class WHERE relname = 'idx00_parttbl_idxstorage') );
|
||||
@ -41,15 +103,15 @@ INSERT INTO coltbl SELECT * FROM rowtbl;
|
||||
TRUNCATE TABLE rowtbl;
|
||||
INSERT INTO rowtbl VALUES ( 1, 5) , (1, 6);
|
||||
INSERT INTO coltbl SELECT * FROM rowtbl;
|
||||
CREATE INDEX idx_coltbl ON coltbl using btree(b);
|
||||
SELECT * FROM coltbl WHERE b < 6 order by 1, 2;
|
||||
CREATE INDEX idx_coltbl ON coltbl(b);
|
||||
SELECT * FROM coltbl WHERE b < 6 order by b;
|
||||
DROP TABLE coltbl;
|
||||
DROP TABLE rowtbl;
|
||||
|
||||
-- index scan: constant target list
|
||||
create table test_index_const_targetlist (id int,info int,info1 int) with(orientation=column);
|
||||
create index idx1_test_index_const_targetlist on test_index_const_targetlist using btree(info);
|
||||
create index idx2_test_index_const_targetlist on test_index_const_targetlist using btree(info1);
|
||||
create index idx1_test_index_const_targetlist on test_index_const_targetlist(info);
|
||||
create index idx2_test_index_const_targetlist on test_index_const_targetlist(info1);
|
||||
insert into test_index_const_targetlist values(generate_series(1,10),generate_series(1,10), 1);
|
||||
update test_index_const_targetlist set info=info+1 where info>5;
|
||||
select 1 from test_index_const_targetlist where info1=1 ;
|
||||
@ -77,7 +139,7 @@ create table psort_schema.psort_base_tab (
|
||||
col_timetz time with time zone,
|
||||
col_interval interval,
|
||||
col_smalldatetine smalldatetime,partial cluster key(col_timestamp)
|
||||
) with (orientation=column) distribute by hash(col_int)
|
||||
) with (orientation=column)
|
||||
partition by range (col_int)
|
||||
(
|
||||
partition vector_base_tab_000_1 values less than (10),
|
||||
@ -140,7 +202,7 @@ create table psort_base_tab (
|
||||
col_timetz time with time zone,
|
||||
col_interval interval,
|
||||
col_smalldatetine smalldatetime,partial cluster key(col_timestamp)
|
||||
) with (orientation=column) distribute by hash(col_int)
|
||||
) with (orientation=column)
|
||||
partition by range (col_int)
|
||||
(
|
||||
partition vector_base_tab_000_1 values less than (10),
|
||||
@ -183,15 +245,15 @@ partition vector_base_tab_000_37 values less than (3887),
|
||||
partition vector_base_tab_000_38 values less than (3987),
|
||||
partition vector_base_tab_000_39 values less than (maxvalue)
|
||||
);
|
||||
create index psort_base_tab_index_0001 on psort_schema.psort_base_tab using btree(col_smallint,col_int,col_char,col_text,col_timestamp,col_date) local;
|
||||
create index psort_base_tab_index_0001 on psort_base_tab using btree(col_smallint,col_int,col_char,col_text,col_timestamp,col_date) local;
|
||||
create index psort_base_tab_index_0001 on psort_schema.psort_base_tab(col_smallint,col_int,col_char,col_text,col_timestamp,col_date) local;
|
||||
create index psort_base_tab_index_0001 on psort_base_tab(col_smallint,col_int,col_char,col_text,col_timestamp,col_date) local;
|
||||
drop table psort_schema.psort_base_tab;
|
||||
drop table psort_base_tab;
|
||||
|
||||
----
|
||||
-- create index in tablespace
|
||||
----
|
||||
create table psort_schema.cstore_col_part (id int, cu int, num int, num1 int) with (orientation = column) distribute by hash(id)
|
||||
create table psort_schema.cstore_col_part (id int, cu int, num int, num1 int) with (orientation = column)
|
||||
partition by range (num1)
|
||||
(
|
||||
partition p1 values less than (1000),
|
||||
@ -201,15 +263,15 @@ partition by range (num1)
|
||||
partition p5 values less than (5000),
|
||||
partition p6 values less than (maxvalue)
|
||||
);
|
||||
create table psort_schema.cstore_row (id int, cu int, num int, num1 int) distribute by hash(id);
|
||||
create table psort_schema.cstore_row (id int, cu int, num int, num1 int) ;
|
||||
insert into psort_schema.cstore_row values(1, 1, generate_series(1, 5000), generate_series(1, 5000));
|
||||
insert into psort_schema.cstore_col_part select * from psort_schema.cstore_row;
|
||||
create tablespace psort_ts location '@testtablespace@/psort_ts' maxsize '256k';
|
||||
create index on psort_schema.cstore_col_part using btree(num) local tablespace psort_ts;
|
||||
create tablespace psort_ts location '@abs_srcdir@/testtablespace/psort_ts' maxsize '256k';
|
||||
create index on psort_schema.cstore_col_part(num) local tablespace psort_ts;
|
||||
drop tablespace psort_ts;
|
||||
create tablespace psort_ts location '@testtablespace@/psort_ts';
|
||||
create tablespace psort_ts location '@abs_srcdir@/testtablespace/psort_ts';
|
||||
start transaction;
|
||||
create index on psort_schema.cstore_col_part using btree(num) local tablespace psort_ts;
|
||||
create index on psort_schema.cstore_col_part(num) local tablespace psort_ts;
|
||||
rollback;
|
||||
drop tablespace psort_ts;
|
||||
drop table psort_schema.cstore_col_part;
|
||||
@ -222,15 +284,15 @@ insert into psort_schema.cstore_row values(1, 3, generate_series(1, 5000), gener
|
||||
insert into psort_schema.cstore_row values(1, 4, generate_series(1, 5000), generate_series(1, 5000));
|
||||
insert into psort_schema.cstore_row values(1, 5, generate_series(1, 5000), generate_series(1, 5000));
|
||||
|
||||
create table psort_schema.cstore_col (id int, cu int, num int, num1 int) with (orientation = column) distribute by hash(id);
|
||||
create table psort_schema.cstore_col (id int, cu int, num int, num1 int) with (orientation = column) ;
|
||||
insert into psort_schema.cstore_col select * from psort_schema.cstore_row where cu = 1;
|
||||
insert into psort_schema.cstore_col select * from psort_schema.cstore_row where cu = 2;
|
||||
insert into psort_schema.cstore_col select * from psort_schema.cstore_row where cu = 3;
|
||||
insert into psort_schema.cstore_col select * from psort_schema.cstore_row where cu = 4;
|
||||
insert into psort_schema.cstore_col select * from psort_schema.cstore_row where cu = 5;
|
||||
|
||||
create index on psort_schema.cstore_col using btree(num);
|
||||
create index on psort_schema.cstore_col using btree(num1);
|
||||
create index on psort_schema.cstore_col(num);
|
||||
create index on psort_schema.cstore_col(num1);
|
||||
|
||||
analyze psort_schema.cstore_col;
|
||||
select count(xmin) from psort_schema.cstore_col where num = 100;
|
||||
@ -240,4 +302,3 @@ drop table psort_schema.cstore_row;
|
||||
drop table psort_schema.cstore_col;
|
||||
|
||||
DROP SCHEMA psort_schema CASCADE;
|
||||
drop schema cstore_btree_index2 cascade;
|
||||
|
||||
@ -82,11 +82,11 @@ SET enable_indexscan = OFF;
|
||||
SET enable_indexonlyscan = OFF;
|
||||
SET enable_bitmapscan = OFF;
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
-- merged index check, indexcan
|
||||
SET enable_seqscan = OFF;
|
||||
@ -94,11 +94,11 @@ SET enable_indexscan = ON;
|
||||
SET enable_indexonlyscan = OFF;
|
||||
SET enable_bitmapscan = OFF;
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
-- merged index check, indexonlycan
|
||||
SET enable_seqscan = OFF;
|
||||
@ -106,11 +106,11 @@ SET enable_indexscan = OFF;
|
||||
SET enable_indexonlyscan = ON;
|
||||
SET enable_bitmapscan = OFF;
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
--4.2 merge 3 partitions into one
|
||||
alter table test_merge_index_test merge partitions
|
||||
@ -122,11 +122,11 @@ SET enable_indexscan = OFF;
|
||||
SET enable_indexonlyscan = OFF;
|
||||
SET enable_bitmapscan = OFF;
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
-- merged index check, indexcan
|
||||
SET enable_seqscan = OFF;
|
||||
@ -134,11 +134,11 @@ SET enable_indexscan = ON;
|
||||
SET enable_indexonlyscan = OFF;
|
||||
SET enable_bitmapscan = OFF;
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
-- merged index check, indexonlycan
|
||||
SET enable_seqscan = OFF;
|
||||
@ -146,11 +146,11 @@ SET enable_indexscan = OFF;
|
||||
SET enable_indexonlyscan = ON;
|
||||
SET enable_bitmapscan = OFF;
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
--4.3 merge multiple partitions into one
|
||||
alter table test_merge_index_test merge partitions
|
||||
@ -188,11 +188,11 @@ SET enable_indexscan = OFF;
|
||||
SET enable_indexonlyscan = OFF;
|
||||
SET enable_bitmapscan = OFF;
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
-- merged index check, indexcan
|
||||
SET enable_seqscan = OFF;
|
||||
@ -200,11 +200,11 @@ SET enable_indexscan = ON;
|
||||
SET enable_indexonlyscan = OFF;
|
||||
SET enable_bitmapscan = OFF;
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
-- merged index check, indexonlycan
|
||||
SET enable_seqscan = OFF;
|
||||
@ -212,11 +212,11 @@ SET enable_indexscan = OFF;
|
||||
SET enable_indexonlyscan = ON;
|
||||
SET enable_bitmapscan = OFF;
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
select * from test_merge_index_test order by c1;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
|
||||
--clean up
|
||||
@ -247,3 +247,4 @@ alter table test_merge_VM merge partitions test_merge_VM_px, test_merge_VM_p3 in
|
||||
select * from test_merge_VM partition (test_merge_VM_p1);
|
||||
|
||||
drop table test_merge_VM;
|
||||
|
||||
|
||||
@ -6,24 +6,24 @@ set qrw_inlist2join_optmode=rule_base;
|
||||
set qrw_inlist2join_optmode=-1;
|
||||
set qrw_inlist2join_optmode=cost_base;
|
||||
|
||||
create table t1(c1 int, c2 int, c3 int) distribute by hash(c1);
|
||||
create table t1(c1 int, c2 int, c3 int);
|
||||
copy t1 from '@abs_srcdir@/data/inlist2join.data';
|
||||
create table t2(c1 int, c2 int, c3 int) distribute by hash(c1);
|
||||
create table t2(c1 int, c2 int, c3 int);
|
||||
insert into t2 select * from t1;
|
||||
|
||||
ANALYZE t1;
|
||||
ANALYZE t2;
|
||||
|
||||
-- T_HashJoin T_Stream T_SubqueryScan
|
||||
explain (costs off, nodes off) select t2.c3, t2.c2 from t2 where t2.c1 > 1 AND t2.c2 in (select t1.c2 from t1 where t1.c1 IN (22376, 7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793,30622,54667,71608,83944,40124,90224,11409,47022,93382,33348,22693,40793,84920,13919,79189, 6675,49103,65433,12945,31682, 2106,42248,61990,66384,86546,62487,60545,74527,73315,42924,47691,88203,67892,26852,72041,35315,33527,57991, 5747, 45109,74104,17051,73311,67981,72523,89732,97553, 7721, 2093,60644,66857,18634,79095,44341,11184,72487, 3615,48173,17393,27185, 6279,69965,22133, 2138,33295,32935,49062,76352,27384,49675,39611,11423, 3726,43077,97087,70532,47240,74421,83989,59023,29279)) order by 1,2;
|
||||
explain (costs off) select t2.c3, t2.c2 from t2 where t2.c1 > 1 AND t2.c2 in (select t1.c2 from t1 where t1.c1 IN (22376, 7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793,30622,54667,71608,83944,40124,90224,11409,47022,93382,33348,22693,40793,84920,13919,79189, 6675,49103,65433,12945,31682, 2106,42248,61990,66384,86546,62487,60545,74527,73315,42924,47691,88203,67892,26852,72041,35315,33527,57991, 5747, 45109,74104,17051,73311,67981,72523,89732,97553, 7721, 2093,60644,66857,18634,79095,44341,11184,72487, 3615,48173,17393,27185, 6279,69965,22133, 2138,33295,32935,49062,76352,27384,49675,39611,11423, 3726,43077,97087,70532,47240,74421,83989,59023,29279)) order by 1,2;
|
||||
|
||||
-- T_MergeJoin
|
||||
set enable_hashjoin =off;
|
||||
explain (costs off, nodes off) select t2.c3, t2.c2 from t2 where t2.c1 > 1 AND t2.c2 in (select t1.c2 from t1 where t1.c1 IN (22376, 7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793,30622,54667,71608,83944,40124,90224,11409,47022,93382,33348,22693,40793,84920,13919,79189, 6675,49103,65433,12945,31682, 2106,42248,61990,66384,86546,62487,60545,74527,73315,42924,47691,88203,67892,26852,72041,35315,33527,57991, 5747, 45109,74104,17051,73311,67981,72523,89732,97553, 7721, 2093,60644,66857,18634,79095,44341,11184,72487, 3615,48173,17393,27185, 6279,69965,22133, 2138,33295,32935,49062,76352,27384,49675,39611,11423, 3726,43077,97087,70532,47240,74421,83989,59023,29279)) order by 1,2;
|
||||
explain (costs off) select t2.c3, t2.c2 from t2 where t2.c1 > 1 AND t2.c2 in (select t1.c2 from t1 where t1.c1 IN (22376, 7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793,30622,54667,71608,83944,40124,90224,11409,47022,93382,33348,22693,40793,84920,13919,79189, 6675,49103,65433,12945,31682, 2106,42248,61990,66384,86546,62487,60545,74527,73315,42924,47691,88203,67892,26852,72041,35315,33527,57991, 5747, 45109,74104,17051,73311,67981,72523,89732,97553, 7721, 2093,60644,66857,18634,79095,44341,11184,72487, 3615,48173,17393,27185, 6279,69965,22133, 2138,33295,32935,49062,76352,27384,49675,39611,11423, 3726,43077,97087,70532,47240,74421,83989,59023,29279)) order by 1,2;
|
||||
|
||||
-- T_MergeJoin T_Material
|
||||
set enable_mergejoin = off;
|
||||
explain (costs off, nodes off) select t2.c3, t2.c2 from t2 where t2.c1 > 1 AND t2.c2 in (select t1.c2 from t1 where t1.c1 IN (22376, 7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793,30622,54667,71608,83944,40124,90224,11409,47022,93382,33348,22693,40793,84920,13919,79189, 6675,49103,65433,12945,31682, 2106,42248,61990,66384,86546,62487,60545,74527,73315,42924,47691,88203,67892,26852,72041,35315,33527,57991, 5747, 45109,74104,17051,73311,67981,72523,89732,97553, 7721, 2093,60644,66857,18634,79095,44341,11184,72487, 3615,48173,17393,27185, 6279,69965,22133, 2138,33295,32935,49062,76352,27384,49675,39611,11423, 3726,43077,97087,70532,47240,74421,83989,59023,29279)) order by 1,2;
|
||||
explain (costs off) select t2.c3, t2.c2 from t2 where t2.c1 > 1 AND t2.c2 in (select t1.c2 from t1 where t1.c1 IN (22376, 7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793,30622,54667,71608,83944,40124,90224,11409,47022,93382,33348,22693,40793,84920,13919,79189, 6675,49103,65433,12945,31682, 2106,42248,61990,66384,86546,62487,60545,74527,73315,42924,47691,88203,67892,26852,72041,35315,33527,57991, 5747, 45109,74104,17051,73311,67981,72523,89732,97553, 7721, 2093,60644,66857,18634,79095,44341,11184,72487, 3615,48173,17393,27185, 6279,69965,22133, 2138,33295,32935,49062,76352,27384,49675,39611,11423, 3726,43077,97087,70532,47240,74421,83989,59023,29279)) order by 1,2;
|
||||
|
||||
create index index1 on t1(c1);
|
||||
create index index2 on t2(c1);
|
||||
@ -31,14 +31,13 @@ create index index2 on t2(c1);
|
||||
set enable_nestloop =on;
|
||||
set enable_hashjoin = on;
|
||||
set enable_bitmapscan = off;
|
||||
explain (costs off, nodes off) select * from (select * from t1 where t1.c1 in (22376, 7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793) union all select * from t2) as dt where dt.c1 in ( 2093,60644,66857,18634,79095,44341,11184,72487, 3615,48173,17393,27185, 6279,69965,22133, 2138,33295,32935,49062,76352,27384,49675,39611,11423, 3726,43077,97087,70532,47240,74421,83989,59023,29279) order by 1;
|
||||
explain (costs off) select * from (select * from t1 where t1.c1 in (22376, 7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793) union all select * from t2) as dt where dt.c1 in ( 2093,60644,66857,18634,79095,44341,11184,72487, 3615,48173,17393,27185, 6279,69965,22133, 2138,33295,32935,49062,76352,27384,49675,39611,11423, 3726,43077,97087,70532,47240,74421,83989,59023,29279) order by 1;
|
||||
|
||||
-- T_MergeAppend
|
||||
|
||||
|
||||
-- partition table
|
||||
create table t1_p(c1 int, c2 int, c3 int)
|
||||
distribute by hash(c1)
|
||||
PARTITION BY RANGE(c1)
|
||||
(
|
||||
PARTITION P1 VALUES LESS THAN(20000),
|
||||
@ -49,7 +48,6 @@ PARTITION P8 VALUES LESS THAN(MAXVALUE)
|
||||
);
|
||||
|
||||
create table t2_p(c1 int, c2 int, c3 int)
|
||||
distribute by hash(c1)
|
||||
PARTITION BY RANGE(c1)
|
||||
(
|
||||
PARTITION P1 VALUES LESS THAN(30000),
|
||||
@ -64,12 +62,13 @@ ANALYZE t1_p;
|
||||
ANALYZE t2_p;
|
||||
|
||||
-- T_PartIterator
|
||||
explain (costs off, nodes off) select t2_p.c2 from t2_p join t1_p on t1_p.c1=t2_p.c2 and t2_p.c2 in (1,2,3,4,5,6,7,8,9,10,11);
|
||||
explain (costs off) select t2_p.c2 from t2_p join t1_p on t1_p.c1=t2_p.c2 and t2_p.c2 in (1,2,3,4,5,6,7,8,9,10,11);
|
||||
set enable_nestloop =off;
|
||||
explain (costs off, nodes off) select t2_p.c2 from t2_p join t1_p on t1_p.c1=t2_p.c2 and t2_p.c2 in (22376, 7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793,30622,54667,71608,83944,40124,90224,11409,47022,93382,33348,22693,40793,84920,13919,79189, 6675,49103,65433,12945,31682, 2106,42248,61990,66384,86546,62487,60545,74527,73315,42924,47691,88203,67892,26852,72041,35315,33527,57991, 5747, 45109,74104,17051,73311,67981,72523,89732,97553, 7721, 2093,60644,66857,18634,79095,44341,11184,72487, 3615,48173,17393,27185, 6279,69965,22133, 2138,33295,32935,49062,76352,27384,49675,39611,11423, 3726,43077,97087,70532,47240,74421,83989,59023,29279);
|
||||
explain (costs off) select t2_p.c2 from t2_p join t1_p on t1_p.c1=t2_p.c2 and t2_p.c2 in (22376, 7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793,30622,54667,71608,83944,40124,90224,11409,47022,93382,33348,22693,40793,84920,13919,79189, 6675,49103,65433,12945,31682, 2106,42248,61990,66384,86546,62487,60545,74527,73315,42924,47691,88203,67892,26852,72041,35315,33527,57991, 5747, 45109,74104,17051,73311,67981,72523,89732,97553, 7721, 2093,60644,66857,18634,79095,44341,11184,72487, 3615,48173,17393,27185, 6279,69965,22133, 2138,33295,32935,49062,76352,27384,49675,39611,11423, 3726,43077,97087,70532,47240,74421,83989,59023,29279);
|
||||
set enable_nestloop =on;
|
||||
|
||||
-- T_WindowAgg plan
|
||||
explain (costs off, nodes off) select c1,c2,avg(c3) OVER (PARTITION BY c1) from t1 where t1.c1 in (1,2,3,4,5,6,7,8,9,10,11) and t1.c2 in (1,2);
|
||||
explain (costs off) select c1,c2,avg(c3) OVER (PARTITION BY c1) from t1 where t1.c1 in (1,2,3,4,5,6,7,8,9,10,11) and t1.c2 in (1,2);
|
||||
|
||||
drop schema inlist2join_cost_base cascade;
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ CREATE TABLE vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_02(
|
||||
C_DP double precision,
|
||||
C_DATE DATE,
|
||||
C_TS_WITHOUT TIMESTAMP WITHOUT TIME ZONE,
|
||||
C_TS_WITH TIMESTAMP WITH TIME ZONE, PARTIAL CLUSTER KEY(C_INT))WITH (ORIENTATION=COLUMN) DISTRIBUTE BY HASH (C_INT);
|
||||
C_TS_WITH TIMESTAMP WITH TIME ZONE, PARTIAL CLUSTER KEY(C_INT))WITH (ORIENTATION=COLUMN);
|
||||
|
||||
CREATE TABLE vector_hashjoin_engine.ROW_HASHJOIN_TABLE_03(
|
||||
C_CHAR_1 CHAR(1),
|
||||
@ -151,55 +151,55 @@ CREATE TABLE vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_03(
|
||||
c1 int
|
||||
,c2 int
|
||||
,c3 char(100)
|
||||
)distribute by hash(c1);
|
||||
);
|
||||
|
||||
create table vector_hashjoin_engine.ROW_HASHJOIN_TABLE_06
|
||||
(
|
||||
c1 int
|
||||
,c2 int
|
||||
,c3 char(100)
|
||||
)distribute by hash(c2);
|
||||
);
|
||||
|
||||
create table vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_05
|
||||
(
|
||||
c1 int
|
||||
,c2 int
|
||||
,c3 char(100)
|
||||
)with (orientation = column) distribute by hash(c1);
|
||||
)with (orientation = column);
|
||||
|
||||
create table vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_06
|
||||
(
|
||||
c1 int
|
||||
,c2 int
|
||||
,c3 char(100)
|
||||
)with (orientation = column) distribute by hash(c2);
|
||||
)with (orientation = column);
|
||||
|
||||
|
||||
create table vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_09
|
||||
(
|
||||
c1 int1
|
||||
,c2 int
|
||||
)with (orientation = column) distribute by hash(c2);
|
||||
)with (orientation = column);
|
||||
|
||||
create table vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_10
|
||||
(
|
||||
c1 int1
|
||||
,c2 int
|
||||
)with (orientation = column) distribute by hash(c2);
|
||||
)with (orientation = column);
|
||||
|
||||
create table vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_13
|
||||
(
|
||||
c1 int not null
|
||||
,c2 bigint not null
|
||||
,c3 char(6) not null
|
||||
)with (orientation = column) distribute by hash(c1);
|
||||
)with (orientation = column);
|
||||
|
||||
create table vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_14
|
||||
(
|
||||
c1 int not null
|
||||
,c2 bigint not null
|
||||
,c3 char(6) not null
|
||||
)with (orientation = column) distribute by hash(c1);
|
||||
)with (orientation = column);
|
||||
|
||||
|
||||
|
||||
@ -308,7 +308,7 @@ explain (verbose on, costs off) SELECT A.C_INT,A.C_BIGINT,A.C_VARCHAR_3,A.C_DATE
|
||||
SELECT A.C_INT,A.C_BIGINT,A.C_VARCHAR_3,A.C_DATE FROM VECTOR_HASHJOIN_TABLE_01 A LEFT JOIN VECTOR_HASHJOIN_TABLE_02 B ON A.C_INT = B.C_INT WHERE A.C_INT >10 AND A.C_BIGINT>5 ORDER BY 1, 2;
|
||||
--SELECT A.C_INT,A.C_BIGINT,A.C_VARCHAR_3,A.C_DATE FROM VECTOR_HASHJOIN_TABLE_01 A LEFT JOIN VECTOR_HASHJOIN_TABLE_02 B ON A.C_INT = B.C_INT WHERE A.C_INT <10 AND A.C_BIGINT>5 ORDER BY 1, 2;
|
||||
|
||||
explain (verbose on, costs off, nodes off) SELECT A.C_INT,A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_01 A LEFT JOIN VECTOR_HASHJOIN_TABLE_02 B ON A.C_INT = B.C_INT and A.C_BIGINT > 1000 WHERE A.C_INT <4 ORDER BY 1, 2;
|
||||
explain (verbose on, costs off) SELECT A.C_INT,A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_01 A LEFT JOIN VECTOR_HASHJOIN_TABLE_02 B ON A.C_INT = B.C_INT and A.C_BIGINT > 1000 WHERE A.C_INT <4 ORDER BY 1, 2;
|
||||
SELECT A.C_INT,A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_01 A LEFT JOIN VECTOR_HASHJOIN_TABLE_02 B ON A.C_INT = B.C_INT and A.C_BIGINT > 1000 WHERE A.C_INT <4 ORDER BY 1, 2;
|
||||
|
||||
SELECT B.C_INT, A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_04 B RIGHT JOIN VECTOR_HASHJOIN_TABLE_03 A ON A.C_INT = B.C_INT AND A.C_BIGINT<2 order by 1,2;
|
||||
@ -318,10 +318,10 @@ SELECT B.C_INT, A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_04 B RIGHT JOIN VECTOR_HA
|
||||
----
|
||||
--- case 3: HashJoin Anti Join
|
||||
----
|
||||
explain (verbose on, costs off, nodes off) SELECT B.C_INT , A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_04 B RIGHT JOIN VECTOR_HASHJOIN_TABLE_03 A ON A.C_INT = B.C_INT AND A.C_BIGINT<2 where B.C_INT is NULL order by 1,2;
|
||||
explain (verbose on, costs off) SELECT B.C_INT , A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_04 B RIGHT JOIN VECTOR_HASHJOIN_TABLE_03 A ON A.C_INT = B.C_INT AND A.C_BIGINT<2 where B.C_INT is NULL order by 1,2;
|
||||
SELECT B.C_INT , A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_04 B RIGHT JOIN VECTOR_HASHJOIN_TABLE_03 A ON A.C_INT = B.C_INT AND A.C_BIGINT<2 where B.C_INT is NULL order by 1,2;
|
||||
|
||||
explain (verbose on, costs off, nodes off) SELECT B.C_INT, A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_04 B RIGHT JOIN VECTOR_HASHJOIN_TABLE_03 A ON A.C_INT = B.C_INT where B.C_INT is NULL order by 1,2;
|
||||
explain (verbose on, costs off) SELECT B.C_INT, A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_04 B RIGHT JOIN VECTOR_HASHJOIN_TABLE_03 A ON A.C_INT = B.C_INT where B.C_INT is NULL order by 1,2;
|
||||
SELECT B.C_INT, A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_04 B RIGHT JOIN VECTOR_HASHJOIN_TABLE_03 A ON A.C_INT = B.C_INT where B.C_INT is NULL order by 1,2;
|
||||
|
||||
----
|
||||
|
||||
@ -1,22 +1,22 @@
|
||||
create type complex;
|
||||
CREATE FUNCTION complex_in(cstring)
|
||||
RETURNS complex
|
||||
AS '@libdir@/regress@DLSUFFIX@','complex_in'
|
||||
AS '/usr3/data1/jiangyan/openGauss-server/src/test/regress/regress.so','complex_in'
|
||||
LANGUAGE C IMMUTABLE STRICT not fenced;
|
||||
NOTICE: return type complex is only a shell
|
||||
CREATE FUNCTION complex_out(complex)
|
||||
RETURNS cstring
|
||||
AS '@libdir@/regress@DLSUFFIX@','complex_out'
|
||||
AS '/usr3/data1/jiangyan/openGauss-server/src/test/regress/regress.so','complex_out'
|
||||
LANGUAGE C IMMUTABLE STRICT not fenced;
|
||||
NOTICE: argument type complex is only a shell
|
||||
CREATE FUNCTION complex_recv(internal)
|
||||
RETURNS complex
|
||||
AS '@libdir@/regress@DLSUFFIX@','complex_recv'
|
||||
AS '/usr3/data1/jiangyan/openGauss-server/src/test/regress/regress.so','complex_recv'
|
||||
LANGUAGE C IMMUTABLE STRICT not fenced;
|
||||
NOTICE: return type complex is only a shell
|
||||
CREATE FUNCTION complex_send(complex)
|
||||
RETURNS bytea
|
||||
AS '@libdir@/regress@DLSUFFIX@','complex_send'
|
||||
AS '/usr3/data1/jiangyan/openGauss-server/src/test/regress/regress.so','complex_send'
|
||||
LANGUAGE C IMMUTABLE STRICT not fenced;
|
||||
NOTICE: argument type complex is only a shell
|
||||
CREATE TYPE complex (
|
||||
@ -140,6 +140,11 @@ CREATE TYPE name (
|
||||
|
||||
CREATE TYPE name
|
||||
|
||||
CREATE TYPE name AS ENUM
|
||||
( [ 'lable' [, ... ] ] )
|
||||
|
||||
CREATE TYPE name AS TABLE OF data_type
|
||||
|
||||
\h alter type
|
||||
Command: ALTER TYPE
|
||||
Description: change the definition of a type
|
||||
|
||||
@ -21,7 +21,8 @@ CREATE DATA SOURCE llt_mppdb_8 TYPE 'MPPDB' VERSION NULL OPTIONS (dsn 'mppdb', e
|
||||
CREATE DATA SOURCE llt_mppdb_9 OPTIONS (username '', dsn 'mppdb');
|
||||
\! echo $GAUSSHOME | sed 's/^.*tmp_check\/install\///g' | xargs -I{} rm -f {}/bin/datasource.key.cipher
|
||||
\! echo $GAUSSHOME | sed 's/^.*tmp_check\/install\///g' | xargs -I{} rm -f {}/bin/datasource.key.rand
|
||||
\! echo $GAUSSHOME | sed 's/^.*tmp_check\/install\///g' | xargs -I{} @abs_bindir@/gs_guc generate -S 123456@pwd -D {}/bin -o datasource > /dev/null 2>&1
|
||||
\! echo $GAUSSHOME | sed 's/^.*tmp_check\/install\///g' | xargs -I{} /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc generate -S 123456@pwd -D {}/bin -o datasource
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -S ******** -D /data1/jiangyan/openGauss-server//dest/bin/..//bin -o datasource generate ].
|
||||
gs_guc generate -S ***
|
||||
CREATE DATA SOURCE llt_mppdb_10 TYPE 'MPPDB' VERSION 'V1R7C10' OPTIONS (dsn 'mppdb', password 'pwd@123456789');
|
||||
CREATE DATA SOURCE llt_mppdb_11 TYPE 'MPPDB' VERSION 'V1R7C10' OPTIONS (dsn 'mppdb', password 'pwd');
|
||||
@ -95,7 +96,7 @@ CREATE DATA SOURCE llt_tst_ds_1 options (dsn 'encryptOpt');
|
||||
CREATE DATA SOURCE llt_tst_ds_2 options (encoding 'encryptOpt123');
|
||||
CREATE DATA SOURCE llt_tst_ds_3 options (dsn 'tst', username 'encryptOpt12345678901234567', password 'encryptOpt12345671234567890');
|
||||
NOTICE: Using probably encrypted option (prefix='encryptOpt') directly and it is not recommended.
|
||||
HINT: The DATA SOURCE object can't be used if the option is not encrypted correctly.
|
||||
HINT: The datasource object can't be used if the option is not encrypted correctly.
|
||||
SELECT srcoptions FROM pg_extension_data_source where srcname='llt_tst_ds_1';
|
||||
srcoptions
|
||||
------------------
|
||||
@ -255,9 +256,10 @@ SELECT * FROM PG_EXTENSION_DATA_SOURCE WHERE SRCNAME='llt_mppdb_31';
|
||||
\! echo $GAUSSHOME | sed 's/^.*tmp_check\/install\///g' | xargs -I{} rm -f {}/bin/datasource.key.cipher
|
||||
\! echo $GAUSSHOME | sed 's/^.*tmp_check\/install\///g' | xargs -I{} rm -f {}/bin/datasource.key.rand
|
||||
ALTER DATA SOURCE llt_mppdb_31 TYPE 'MPPDB3' VERSION 'V1R7C20' OPTIONS (DROP encoding, username '123user', SET password '123456@pwd');
|
||||
--?.*
|
||||
--?.*
|
||||
\! echo $GAUSSHOME | sed 's/^.*tmp_check\/install\///g' | xargs -I{} @abs_bindir@/gs_guc generate -S 123456@pwd -D {}/bin -o datasource > /dev/null 2>&1
|
||||
ERROR: No key file datasource.key.cipher
|
||||
HINT: Please create datasource.key.cipher file with gs_guc and gs_ssh, such as :gs_ssh -c "gs_guc generate -S XXX -D $GAUSSHOME/bin -o datasource"
|
||||
\! echo $GAUSSHOME | sed 's/^.*tmp_check\/install\///g' | xargs -I{} /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc generate -S 123456@pwd -D {}/bin -o datasource
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -S ******** -D /data1/jiangyan/openGauss-server//dest/bin/..//bin -o datasource generate ].
|
||||
gs_guc generate -S ***
|
||||
SELECT PG_SLEEP(1);
|
||||
pg_sleep
|
||||
@ -269,9 +271,9 @@ ALTER DATA SOURCE llt_mppdb_31 TYPE 'MPPDB3' VERSION 'V1R7C20' OPTIONS (DROP enc
|
||||
\! echo $GAUSSHOME | sed 's/^.*tmp_check\/install\///g' | xargs -I{} rm -f {}/bin/datasource.key.cipher
|
||||
\! echo $GAUSSHOME | sed 's/^.*tmp_check\/install\///g' | xargs -I{} rm -f {}/bin/datasource.key.rand
|
||||
SELECT * FROM PG_EXTENSION_DATA_SOURCE WHERE SRCNAME='llt_mppdb_31';
|
||||
--?.*
|
||||
--?.*
|
||||
--? llt_mppdb_31 | 10 | MPPDB3 | V1R7C20 | | {dsn=mppdb2,password=.*,username=.*}
|
||||
srcname | srcowner | srctype | srcversion | srcacl | srcoptions
|
||||
--------------+----------+---------+------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
llt_mppdb_31 | 10 | MPPDB3 | V1R7C20 | | {dsn=mppdb2,password=encryptOptvj5E4r/A+1gzoFLm+HHetKWyCPWQB3uD9EyBSq7Yun6n7ih1Tnyk+dbBKJtWNcoT,username=encryptOptYEkl7iYwIlMreLTJV3QKXd+nCGXA9GxKEr5RywDEoIWYsZhvDZH1WkEVWbyxRpzA}
|
||||
(1 row)
|
||||
|
||||
-- duplicated options
|
||||
@ -298,7 +300,7 @@ ALTER DATA SOURCE llt_mppdb_31 RENAME TO llt_mppdb_31_new;
|
||||
SELECT srcname, srcowner FROM PG_EXTENSION_DATA_SOURCE WHERE SRCNAME='llt_mppdb_31_new';
|
||||
srcname | srcowner
|
||||
------------------+----------
|
||||
--? llt_mppdb_31_new |.*
|
||||
llt_mppdb_31_new | 10
|
||||
(1 row)
|
||||
|
||||
-- alter owner
|
||||
@ -311,7 +313,7 @@ ALTER DATA SOURCE llt_mppdb_31_new OWNER TO PLOKEN1;
|
||||
SELECT srcname, srcowner FROM PG_EXTENSION_DATA_SOURCE WHERE SRCNAME='llt_mppdb_31_new';
|
||||
srcname | srcowner
|
||||
------------------+----------
|
||||
--? llt_mppdb_31_new |.*
|
||||
llt_mppdb_31_new | 16429
|
||||
(1 row)
|
||||
|
||||
DROP DATA SOURCE IF EXISTS llt_mppdb_31_new CASCADE;
|
||||
@ -326,34 +328,35 @@ CREATE USER PLOKEN3 IDENTIFIED BY 'Gs@654321';
|
||||
-- grant invalid privileges
|
||||
GRANT SELECT ON DATA SOURCE llt_mppdb_41 TO PLOKEN2;
|
||||
ERROR: invalid privilege type SELECT for data source
|
||||
DETAIL: N/A
|
||||
-- grant valid privileges, here usage == all
|
||||
GRANT USAGE ON DATA SOURCE llt_mppdb_41 TO PLOKEN2;
|
||||
GRANT ALL PRIVILEGES ON DATA SOURCE llt_mppdb_42 TO PLOKEN2;
|
||||
SELECT srcname, srcacl FROM PG_EXTENSION_DATA_SOURCE WHERE srcname='llt_mppdb_41';
|
||||
--?.*
|
||||
--?.*
|
||||
llt_mppdb_41 | {@login_user@=U/@login_user@,ploken2=U/@login_user@}
|
||||
srcname | srcacl
|
||||
--------------+------------------------------------------
|
||||
llt_mppdb_41 | {jiangyan=U/jiangyan,ploken2=U/jiangyan}
|
||||
(1 row)
|
||||
|
||||
SELECT srcname, srcacl FROM PG_EXTENSION_DATA_SOURCE WHERE srcname='llt_mppdb_42';
|
||||
--?.*
|
||||
--?.*
|
||||
llt_mppdb_42 | {@login_user@=U/@login_user@,ploken2=U/@login_user@}
|
||||
srcname | srcacl
|
||||
--------------+------------------------------------------
|
||||
llt_mppdb_42 | {jiangyan=U/jiangyan,ploken2=U/jiangyan}
|
||||
(1 row)
|
||||
|
||||
-- revoke privileges
|
||||
REVOKE USAGE ON DATA SOURCE llt_mppdb_41 FROM PLOKEN2;
|
||||
REVOKE ALL ON DATA SOURCE llt_mppdb_42 FROM PLOKEN2;
|
||||
SELECT srcname, srcacl FROM PG_EXTENSION_DATA_SOURCE WHERE srcname='llt_mppdb_41';
|
||||
--?.*
|
||||
--?.*
|
||||
llt_mppdb_41 | {@login_user@=U/@login_user@}
|
||||
srcname | srcacl
|
||||
--------------+-----------------------
|
||||
llt_mppdb_41 | {jiangyan=U/jiangyan}
|
||||
(1 row)
|
||||
|
||||
SELECT srcname, srcacl FROM PG_EXTENSION_DATA_SOURCE WHERE srcname='llt_mppdb_42';
|
||||
--?.*
|
||||
--?.*
|
||||
llt_mppdb_42 | {@login_user@=U/@login_user@}
|
||||
srcname | srcacl
|
||||
--------------+-----------------------
|
||||
llt_mppdb_42 | {jiangyan=U/jiangyan}
|
||||
(1 row)
|
||||
|
||||
-- change owner
|
||||
@ -363,18 +366,18 @@ ALTER DATA SOURCE llt_mppdb_42 OWNER TO PLOKEN3;
|
||||
GRANT ALL ON DATA SOURCE llt_mppdb_42 TO PLOKEN3;
|
||||
GRANT ALL ON DATA SOURCE llt_mppdb_42 TO PLOKEN2;
|
||||
SELECT srcname, srcacl FROM PG_EXTENSION_DATA_SOURCE WHERE srcname='llt_mppdb_42';
|
||||
--?.*
|
||||
--?.*
|
||||
llt_mppdb_42 | {@login_user@=U/@login_user@,ploken3=U/ploken3,ploken2=U/ploken3}
|
||||
srcname | srcacl
|
||||
--------------+-----------------------------------------------------------
|
||||
llt_mppdb_42 | {jiangyan=U/jiangyan,ploken3=U/ploken3,ploken2=U/ploken3}
|
||||
(1 row)
|
||||
|
||||
-- revoke usage (test all == usage)
|
||||
REVOKE USAGE ON DATA SOURCE llt_mppdb_42 FROM PLOKEN3;
|
||||
REVOKE USAGE ON DATA SOURCE llt_mppdb_42 FROM PLOKEN2;
|
||||
SELECT srcname, srcacl FROM PG_EXTENSION_DATA_SOURCE WHERE srcname='llt_mppdb_42';
|
||||
--?.*
|
||||
--?.*
|
||||
llt_mppdb_42 | {@login_user@=U/@login_user@}
|
||||
srcname | srcacl
|
||||
--------------+-----------------------
|
||||
llt_mppdb_42 | {jiangyan=U/jiangyan}
|
||||
(1 row)
|
||||
|
||||
DROP DATA SOURCE llt_mppdb_41;
|
||||
@ -390,11 +393,11 @@ create data source mpp_llt_01 options (dsn 'mpp_llt_01');
|
||||
create data source mpp_llt_01;
|
||||
ERROR: data source "mpp_llt_01" already exists
|
||||
grant usage on data source mpp_llt_01 to ds_user_llt_01;
|
||||
\! @abs_bindir@/gsql -d postgres -p @portstring@ -U ds_user_llt_01 -W Gs@123456 -c "grant usage on data source mpp_llt_01 to ds_user_llt_02;"
|
||||
WARNING: no privileges were granted for "mpp_llt_01"
|
||||
GRANT
|
||||
\! @abs_bindir@/gsql -d postgres -p @portstring@ -U ds_user_llt_01 -W Gs@123456 -c "alter data source mpp_llt_01 version '11.1';"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gsql -d postgres -p 25632 -U ds_user_llt_01 -W Gs@123456 -c "grant usage on data source mpp_llt_01 to ds_user_llt_02;"
|
||||
ERROR: no privileges were granted for "mpp_llt_01"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gsql -d postgres -p 25632 -U ds_user_llt_01 -W Gs@123456 -c "alter data source mpp_llt_01 version '11.1';"
|
||||
ERROR: must be owner of data source mpp_llt_01
|
||||
DETAIL: N/A
|
||||
drop data source mpp_llt_01;
|
||||
drop user ds_user_llt_01;
|
||||
drop user ds_user_llt_02;
|
||||
@ -404,70 +407,50 @@ drop user ds_user_llt_02;
|
||||
create data source myself options (dsn 'myself');
|
||||
create table ds_s2_tbl_001 (c1 int);
|
||||
explain (costs off) select * from exec_on_extension('myself', 'select * from a') as (c1 int);
|
||||
QUERY PLAN
|
||||
------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
--? Node/s: datanode.*
|
||||
-> Function Scan on exec_on_extension
|
||||
(3 rows)
|
||||
QUERY PLAN
|
||||
------------------------------------
|
||||
Function Scan on exec_on_extension
|
||||
(1 row)
|
||||
|
||||
explain (costs off) select * from exec_hadoop_sql('myself', 'select * from a', '') as (c1 int);
|
||||
QUERY PLAN
|
||||
----------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
--? Node/s: datanode.*
|
||||
-> Function Scan on exec_hadoop_sql
|
||||
(3 rows)
|
||||
QUERY PLAN
|
||||
----------------------------------
|
||||
Function Scan on exec_hadoop_sql
|
||||
(1 row)
|
||||
|
||||
explain (costs off) insert into ds_s2_tbl_001 select * from exec_on_extension('myself', 'select * from a') as (c1 int);
|
||||
QUERY PLAN
|
||||
------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Node/s: All datanodes
|
||||
-> Insert on ds_s2_tbl_001
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
--? Spawn on: datanode.*
|
||||
-> Function Scan on exec_on_extension
|
||||
(6 rows)
|
||||
QUERY PLAN
|
||||
------------------------------------------
|
||||
Insert on ds_s2_tbl_001
|
||||
-> Function Scan on exec_on_extension
|
||||
(2 rows)
|
||||
|
||||
explain (costs off) insert into ds_s2_tbl_001 select * from exec_hadoop_sql('myself', 'select * from a', '') as (c1 int);
|
||||
QUERY PLAN
|
||||
----------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Node/s: All datanodes
|
||||
-> Insert on ds_s2_tbl_001
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
--? Spawn on: datanode.*
|
||||
-> Function Scan on exec_hadoop_sql
|
||||
(6 rows)
|
||||
QUERY PLAN
|
||||
----------------------------------------
|
||||
Insert on ds_s2_tbl_001
|
||||
-> Function Scan on exec_hadoop_sql
|
||||
(2 rows)
|
||||
|
||||
explain (costs off) select * from (select * from exec_on_extension('myself', 'select * from a') as (c1 int)) a inner join ds_s2_tbl_001 b on a.c1=b.c1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Node/s: All datanodes
|
||||
-> Hash Join
|
||||
Hash Cond: (exec_on_extension.c1 = b.c1)
|
||||
QUERY PLAN
|
||||
------------------------------------------------
|
||||
Hash Join
|
||||
Hash Cond: (b.c1 = exec_on_extension.c1)
|
||||
-> Seq Scan on ds_s2_tbl_001 b
|
||||
-> Hash
|
||||
-> Function Scan on exec_on_extension
|
||||
-> Hash
|
||||
-> Streaming(type: BROADCAST)
|
||||
Spawn on: All datanodes
|
||||
-> Seq Scan on ds_s2_tbl_001 b
|
||||
(9 rows)
|
||||
(5 rows)
|
||||
|
||||
explain (costs off) select * from (select * from exec_hadoop_sql('myself', 'select * from a', '') as (c1 int)) a inner join ds_s2_tbl_001 b on a.c1=b.c1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Node/s: All datanodes
|
||||
-> Hash Join
|
||||
Hash Cond: (exec_hadoop_sql.c1 = b.c1)
|
||||
QUERY PLAN
|
||||
----------------------------------------------
|
||||
Hash Join
|
||||
Hash Cond: (b.c1 = exec_hadoop_sql.c1)
|
||||
-> Seq Scan on ds_s2_tbl_001 b
|
||||
-> Hash
|
||||
-> Function Scan on exec_hadoop_sql
|
||||
-> Hash
|
||||
-> Streaming(type: BROADCAST)
|
||||
Spawn on: All datanodes
|
||||
-> Seq Scan on ds_s2_tbl_001 b
|
||||
(9 rows)
|
||||
(5 rows)
|
||||
|
||||
explain (costs off) select * from
|
||||
ds_s2_tbl_001,
|
||||
@ -476,28 +459,20 @@ where
|
||||
ds_s2_tbl_001.c1 = b.c1 and
|
||||
b.c1 in
|
||||
(select * from exec_on_extension('myself', 'select * from a') as (c1 int));
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Node/s: All datanodes
|
||||
-> Hash Join
|
||||
Hash Cond: (exec_on_extension.c1 = ds_s2_tbl_001.c1)
|
||||
-> Function Scan on exec_on_extension
|
||||
-> Hash
|
||||
-> Streaming(type: BROADCAST)
|
||||
Spawn on: All datanodes
|
||||
-> Hash Join
|
||||
Hash Cond: (ds_s2_tbl_001.c1 = exec_on_extension.c1)
|
||||
-> Seq Scan on ds_s2_tbl_001
|
||||
-> Hash
|
||||
-> HashAggregate
|
||||
Group By Key: exec_on_extension.c1
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
--? Spawn on: datanode.*
|
||||
-> HashAggregate
|
||||
Group By Key: exec_on_extension.c1
|
||||
-> Function Scan on exec_on_extension
|
||||
(19 rows)
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------
|
||||
Hash Join
|
||||
Hash Cond: (ds_s2_tbl_001.c1 = exec_on_extension.c1)
|
||||
-> Seq Scan on ds_s2_tbl_001
|
||||
-> Hash
|
||||
-> Hash Join
|
||||
Hash Cond: (exec_on_extension.c1 = exec_on_extension.c1)
|
||||
-> Function Scan on exec_on_extension
|
||||
-> Hash
|
||||
-> HashAggregate
|
||||
Group By Key: exec_on_extension.c1
|
||||
-> Function Scan on exec_on_extension
|
||||
(11 rows)
|
||||
|
||||
explain (costs off) select * from
|
||||
ds_s2_tbl_001,
|
||||
@ -506,28 +481,20 @@ where
|
||||
ds_s2_tbl_001.c1 = b.c1 and
|
||||
b.c1 in
|
||||
(select * from exec_hadoop_sql('myself', 'select * from a', '') as (c1 int));
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Node/s: All datanodes
|
||||
-> Hash Join
|
||||
Hash Cond: (exec_hadoop_sql.c1 = ds_s2_tbl_001.c1)
|
||||
-> Function Scan on exec_hadoop_sql
|
||||
-> Hash
|
||||
-> Streaming(type: BROADCAST)
|
||||
Spawn on: All datanodes
|
||||
-> Hash Join
|
||||
Hash Cond: (ds_s2_tbl_001.c1 = exec_hadoop_sql.c1)
|
||||
-> Seq Scan on ds_s2_tbl_001
|
||||
-> Hash
|
||||
-> HashAggregate
|
||||
Group By Key: exec_hadoop_sql.c1
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
--? Spawn on: datanode.*
|
||||
-> HashAggregate
|
||||
Group By Key: exec_hadoop_sql.c1
|
||||
-> Function Scan on exec_hadoop_sql
|
||||
(19 rows)
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------
|
||||
Hash Join
|
||||
Hash Cond: (ds_s2_tbl_001.c1 = exec_hadoop_sql.c1)
|
||||
-> Seq Scan on ds_s2_tbl_001
|
||||
-> Hash
|
||||
-> Hash Join
|
||||
Hash Cond: (exec_hadoop_sql.c1 = exec_hadoop_sql.c1)
|
||||
-> Function Scan on exec_hadoop_sql
|
||||
-> Hash
|
||||
-> HashAggregate
|
||||
Group By Key: exec_hadoop_sql.c1
|
||||
-> Function Scan on exec_hadoop_sql
|
||||
(11 rows)
|
||||
|
||||
explain (costs off) select * from
|
||||
ds_s2_tbl_001,
|
||||
@ -536,28 +503,20 @@ where
|
||||
ds_s2_tbl_001.c1 = b.c1 and
|
||||
b.c1 in
|
||||
(select * from exec_hadoop_sql('myself', 'select * from a', '') as (c1 int));
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Node/s: All datanodes
|
||||
-> Hash Join
|
||||
Hash Cond: (exec_on_extension.c1 = ds_s2_tbl_001.c1)
|
||||
-> Function Scan on exec_on_extension
|
||||
-> Hash
|
||||
-> Streaming(type: BROADCAST)
|
||||
Spawn on: All datanodes
|
||||
-> Hash Join
|
||||
Hash Cond: (ds_s2_tbl_001.c1 = exec_hadoop_sql.c1)
|
||||
-> Seq Scan on ds_s2_tbl_001
|
||||
-> Hash
|
||||
-> HashAggregate
|
||||
Group By Key: exec_hadoop_sql.c1
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
--? Spawn on: datanode.*
|
||||
-> HashAggregate
|
||||
Group By Key: exec_hadoop_sql.c1
|
||||
-> Function Scan on exec_hadoop_sql
|
||||
(19 rows)
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------
|
||||
Hash Join
|
||||
Hash Cond: (ds_s2_tbl_001.c1 = exec_on_extension.c1)
|
||||
-> Seq Scan on ds_s2_tbl_001
|
||||
-> Hash
|
||||
-> Hash Join
|
||||
Hash Cond: (exec_on_extension.c1 = exec_hadoop_sql.c1)
|
||||
-> Function Scan on exec_on_extension
|
||||
-> Hash
|
||||
-> HashAggregate
|
||||
Group By Key: exec_hadoop_sql.c1
|
||||
-> Function Scan on exec_hadoop_sql
|
||||
(11 rows)
|
||||
|
||||
explain (costs off) select * from
|
||||
ds_s2_tbl_001,
|
||||
@ -566,28 +525,20 @@ where
|
||||
ds_s2_tbl_001.c1 = b.c1 and
|
||||
b.c1 in
|
||||
(select * from exec_on_extension('myself', 'select * from a') as (c1 int));
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Node/s: All datanodes
|
||||
-> Hash Join
|
||||
Hash Cond: (exec_hadoop_sql.c1 = ds_s2_tbl_001.c1)
|
||||
-> Function Scan on exec_hadoop_sql
|
||||
-> Hash
|
||||
-> Streaming(type: BROADCAST)
|
||||
Spawn on: All datanodes
|
||||
-> Hash Join
|
||||
Hash Cond: (ds_s2_tbl_001.c1 = exec_on_extension.c1)
|
||||
-> Seq Scan on ds_s2_tbl_001
|
||||
-> Hash
|
||||
-> HashAggregate
|
||||
Group By Key: exec_on_extension.c1
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
--? Spawn on: datanode.*
|
||||
-> HashAggregate
|
||||
Group By Key: exec_on_extension.c1
|
||||
-> Function Scan on exec_on_extension
|
||||
(19 rows)
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------
|
||||
Hash Join
|
||||
Hash Cond: (ds_s2_tbl_001.c1 = exec_hadoop_sql.c1)
|
||||
-> Seq Scan on ds_s2_tbl_001
|
||||
-> Hash
|
||||
-> Hash Join
|
||||
Hash Cond: (exec_hadoop_sql.c1 = exec_on_extension.c1)
|
||||
-> Function Scan on exec_hadoop_sql
|
||||
-> Hash
|
||||
-> HashAggregate
|
||||
Group By Key: exec_on_extension.c1
|
||||
-> Function Scan on exec_on_extension
|
||||
(11 rows)
|
||||
|
||||
|
||||
drop table ds_s2_tbl_001;
|
||||
|
||||
@ -1,24 +1,24 @@
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "enable_double_write=off"
|
||||
The gs_guc run with the following arguments: [@abs_srcdir@/tmp_check/install//home/liyifeng/gaussMaster/gauss_app1/bin/gs_guc -D @abs_srcdir@/tmp_check/datanode1/ -c enable_double_write=off set ].
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: enable_double_write=off: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "enable_double_write=off"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c enable_double_write=off set ].
|
||||
expected instance path: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: enable_double_write=off: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
\! @abs_bindir@/gs_ctl stop -D @abs_srcdir@/tmp_check/datanode1 > /dev/null
|
||||
\! @abs_bindir@/gs_ctl start -D @abs_srcdir@/tmp_check/datanode1 > /dev/null
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_ctl stop -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1 > /dev/null
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_ctl start -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1 > /dev/null
|
||||
\! sleep 5
|
||||
\! @abs_bindir@/gs_ctl stop -D @abs_srcdir@/tmp_check/datanode1 > /dev/null
|
||||
\! @abs_bindir@/gs_ctl start -D @abs_srcdir@/tmp_check/datanode1 > /dev/null
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_ctl stop -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1 > /dev/null
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_ctl start -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1 > /dev/null
|
||||
\! sleep 5
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "enable_double_write=on"
|
||||
The gs_guc run with the following arguments: [@abs_srcdir@/tmp_check/install//home/liyifeng/gaussMaster/gauss_app1/bin/gs_guc -D @abs_srcdir@/tmp_check/datanode1/ -c enable_double_write=on set ].
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: enable_double_write=on: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "enable_double_write=on"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c enable_double_write=on set ].
|
||||
expected instance path: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: enable_double_write=on: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
\! @abs_bindir@/gs_ctl stop -D @abs_srcdir@/tmp_check/datanode1 > /dev/null
|
||||
\! @abs_bindir@/gs_ctl start -D @abs_srcdir@/tmp_check/datanode1 > /dev/null
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_ctl stop -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1 > /dev/null
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_ctl start -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1 > /dev/null
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
\! @abs_bindir@/gsql -dpostgres -p @portstring@ -c "create table gin_getbitmap_table (c_int int,c_bigint bigint,c_varchar varchar,c_text text)with(orientation=row);";
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gsql -dpostgres -p 25632 -c "create table gin_getbitmap_table (c_int int,c_bigint bigint,c_varchar varchar,c_text text)with(orientation=row);";
|
||||
CREATE TABLE
|
||||
\! @abs_bindir@/gsql -dpostgres -p @portstring@ -c "\copy gin_getbitmap_table from '@abs_srcdir@/data/gin_@.txt' delimiter ',';";
|
||||
\! @abs_bindir@/gsql -dpostgres -p @portstring@ -c "create text search configuration tscp_utf8_003(parser=pound) with(split_flag='@');";
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gsql -dpostgres -p 25632 -c "\copy gin_getbitmap_table from '/usr3/data1/jiangyan/openGauss-server/src/test/regress/data/gin_@.txt' delimiter ',';";
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gsql -dpostgres -p 25632 -c "create text search configuration tscp_utf8_003(parser=pound) with(split_flag='@');";
|
||||
CREATE TEXT SEARCH CONFIGURATION
|
||||
\! @abs_bindir@/gsql -dpostgres -p @portstring@ -c "alter text search configuration tscp_utf8_003 add mapping for zh_words, en_word, multisymbol,numeric, alnum, grapsymbol with simple;";
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gsql -dpostgres -p 25632 -c "alter text search configuration tscp_utf8_003 add mapping for zh_words, en_word, multisymbol,numeric, alnum, grapsymbol with simple;";
|
||||
ALTER TEXT SEARCH CONFIGURATION
|
||||
\! @abs_bindir@/gsql -dpostgres -p @portstring@ -c "create index gin_getbitmap_table_idx1 on gin_getbitmap_table using gin(to_tsvector('tscp_utf8_003',c_varchar));";
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gsql -dpostgres -p 25632 -c "create index gin_getbitmap_table_idx1 on gin_getbitmap_table using gin(to_tsvector('tscp_utf8_003',c_varchar));";
|
||||
CREATE INDEX
|
||||
\! @abs_bindir@/gsql -dpostgres -p @portstring@ -c "create index gin_getbitmap_table_idx2 on gin_getbitmap_table using gin(to_tsvector('tscp_utf8_003',c_text));";
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gsql -dpostgres -p 25632 -c "create index gin_getbitmap_table_idx2 on gin_getbitmap_table using gin(to_tsvector('tscp_utf8_003',c_text));";
|
||||
CREATE INDEX
|
||||
\! @abs_bindir@/gsql -dpostgres -p @portstring@ -c "select count(*) from gin_getbitmap_table where to_tsvector('tscp_utf8_003',c_text) @@ to_tsquery('tscp_utf8_003','////') and to_tsvector('tscp_utf8_003',c_text) @@ to_tsquery('tscp_utf8_003','\$\$\$\$\$\$') and to_tsvector('tscp_utf8_003',c_text) @@ to_tsquery('tscp_utf8_003','#####') and to_tsvector('tscp_utf8_003',c_text) @@ to_tsquery('tscp_utf8_003','%%%%%') and to_tsvector('tscp_utf8_003',c_text) @@ plainto_tsquery('tscp_utf8_003','……&**%') and to_tsvector('tscp_utf8_003',c_text) @@ plainto_tsquery('tscp_utf8_003',' ') and to_tsvector('tscp_utf8_003',c_text) @@ plainto_tsquery('tscp_utf8_003',' ') order by 1;"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gsql -dpostgres -p 25632 -c "select count(*) from gin_getbitmap_table where to_tsvector('tscp_utf8_003',c_text) @@ to_tsquery('tscp_utf8_003','////') and to_tsvector('tscp_utf8_003',c_text) @@ to_tsquery('tscp_utf8_003','\$\$\$\$\$\$') and to_tsvector('tscp_utf8_003',c_text) @@ to_tsquery('tscp_utf8_003','#####') and to_tsvector('tscp_utf8_003',c_text) @@ to_tsquery('tscp_utf8_003','%%%%%') and to_tsvector('tscp_utf8_003',c_text) @@ plainto_tsquery('tscp_utf8_003','……&**%') and to_tsvector('tscp_utf8_003',c_text) @@ plainto_tsquery('tscp_utf8_003',' ') and to_tsvector('tscp_utf8_003',c_text) @@ plainto_tsquery('tscp_utf8_003',' ') order by 1;"
|
||||
count
|
||||
-------
|
||||
575
|
||||
575
|
||||
(1 row)
|
||||
|
||||
|
||||
@ -3,12 +3,11 @@ CREATE DATABASE db_gin_utf8 TEMPLATE template0 encoding 'UTF8';
|
||||
SET ENABLE_SEQSCAN=OFF;
|
||||
SET ENABLE_INDEXSCAN=OFF;
|
||||
SET ENABLE_BITMAPSCAN=ON;
|
||||
SET ENABLE_FAST_QUERY_SHIPPING=OFF;
|
||||
--- import data
|
||||
create table import_data(id int, chepai varchar(10), shenfenzheng varchar(20), duanxin text) distribute by hash (id);
|
||||
copy import_data from '@abs_srcdir@/data/gin_data_1000.txt';
|
||||
create table import_data(id int, chepai varchar(10), shenfenzheng varchar(20), duanxin text);
|
||||
copy import_data from '/usr3/data1/jiangyan/openGauss-server/src/test/regress/data/gin_data_1000.txt';
|
||||
--- import data then create index
|
||||
create table gin_test_data(id int, chepai varchar(10), shenfenzheng varchar(20), duanxin text) distribute by hash (id);
|
||||
create table gin_test_data(id int, chepai varchar(10), shenfenzheng varchar(20), duanxin text);
|
||||
insert into gin_test_data select 1, chepai, shenfenzheng, duanxin from import_data;
|
||||
--- 6 times
|
||||
insert into gin_test_data select * from gin_test_data;
|
||||
@ -59,7 +58,7 @@ select count(*) from gin_test_data where to_tsvector('ngram', shenfenzheng) @@ t
|
||||
(1 row)
|
||||
|
||||
--- gin data page split
|
||||
create table gin_test_data_1(id int, shenfenzheng varchar(20)) distribute by hash (id);
|
||||
create table gin_test_data_1(id int, shenfenzheng varchar(20));
|
||||
insert into gin_test_data_1 select id, shenfenzheng from gin_test_data;
|
||||
--- 7 times
|
||||
insert into gin_test_data_1 select * from gin_test_data_1;
|
||||
|
||||
@ -1,48 +1,46 @@
|
||||
\! @abs_bindir@/gs_guc check -D @abs_srcdir@/tmp_check/datanode1/ -c max_stack_depth
|
||||
--?The gs_guc run with the following arguments: [@abs_bindir@/gs_guc -D @abs_srcdir@/tmp_check/datanode1/ -c max_stack_depth check ].
|
||||
--?.*
|
||||
--?.*
|
||||
--?expected guc information: .*: max_stack_depth=.*
|
||||
--?gs_guc check: .*: max_stack_depth=.*
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc check -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c max_stack_depth
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c max_stack_depth check ].
|
||||
expected guc information: ecs-7159: max_stack_depth=NULL: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc check: ecs-7159: max_stack_depth=NULL: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total GUC values: 1. Failed GUC values: 0.
|
||||
The details for max_stack_depth:
|
||||
--?.*max_stack_depth=.*
|
||||
[ecs-7159] max_stack_depth=NULL [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
\! @abs_bindir@/gs_guc -V
|
||||
--?gs_guc .*
|
||||
\! @abs_bindir@/gs_guc -?
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -V
|
||||
gs_guc (openGauss) 9.2.4
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -?
|
||||
gs_guc is an inferface to modify config files or encrypt plain text to cipher text.
|
||||
|
||||
Checking GUC parameters:
|
||||
gs_guc check [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} {-c "parameter", -c "parameter", ...}
|
||||
gs_guc check [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} {-c parameter, -c parameter, ...}
|
||||
gs_guc check [-Z NODE-TYPE] [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} {-c "parameter", -c "parameter", ...}
|
||||
gs_guc check [-Z NODE-TYPE] [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} {-c parameter, -c parameter, ...}
|
||||
|
||||
Configuring GUC parameters:
|
||||
Usage:
|
||||
gs_guc {set | reload} [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} [--lcname=LCNAME] {-c "parameter = value" -c "parameter = value" ...}
|
||||
gs_guc {set | reload} [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} [--lcname=LCNAME] {-c " parameter = value " -c " parameter = value " ...}
|
||||
gs_guc {set | reload} [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} [--lcname=LCNAME] {-c "parameter = 'value'" -c "parameter = 'value'" ...}
|
||||
gs_guc {set | reload} [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} [--lcname=LCNAME] {-c " parameter = 'value' " -c " parameter = 'value' " ...}
|
||||
gs_guc {set | reload} [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} [--lcname=LCNAME] {-c "parameter" -c "parameter" ...}
|
||||
e.g. gs_guc set -N all -I all -c "program = '\"Hello\", World\!'".
|
||||
e.g. gs_guc reload -N all -I all -c "program = '\"Hello\", World\!'".
|
||||
gs_guc {set | reload} [-Z NODE-TYPE] [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} [--lcname=LCNAME] [--ignore-node=NODES] {-c "parameter = value" -c "parameter = value" ...}
|
||||
gs_guc {set | reload} [-Z NODE-TYPE] [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} [--lcname=LCNAME] [--ignore-node=NODES] {-c " parameter = value " -c " parameter = value " ...}
|
||||
gs_guc {set | reload} [-Z NODE-TYPE] [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} [--lcname=LCNAME] [--ignore-node=NODES] {-c "parameter = 'value'" -c "parameter = 'value'" ...}
|
||||
gs_guc {set | reload} [-Z NODE-TYPE] [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} [--lcname=LCNAME] [--ignore-node=NODES] {-c " parameter = 'value' " -c " parameter = 'value' " ...}
|
||||
gs_guc {set | reload} [-Z NODE-TYPE] [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} [--lcname=LCNAME] [--ignore-node=NODES] {-c "parameter" -c "parameter" ...}
|
||||
e.g. gs_guc set -Z datanode -N all -I all -c "program = '\"Hello\", World\!'".
|
||||
e.g. gs_guc reload -Z datanode -N all -I all -c "program = '\"Hello\", World\!'".
|
||||
|
||||
If parameter value set or reload to DEFAULT OR COMMENT configuration parameter, use the form: -c "parameter"
|
||||
|
||||
You can choose Usage as you like, and perhaps the first one will be more suitable for you!
|
||||
|
||||
Configuring Authentication Policy:
|
||||
gs_guc {set | reload} [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} -h "HOSTTYPE DATABASE USERNAME IPADDR IPMASK AUTHMEHOD authentication-options"
|
||||
gs_guc {set | reload} [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} -h "HOSTTYPE DATABASE USERNAME IPADDR-WITH-IPMASK AUTHMEHOD authentication-options"
|
||||
gs_guc {set | reload} [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} -h "HOSTTYPE DATABASE USERNAME HOSTNAME AUTHMEHOD authentication-options"
|
||||
gs_guc {set | reload} [-Z NODE-TYPE] [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} [--ignore-node=NODES] -h "HOSTTYPE DATABASE USERNAME IPADDR IPMASK AUTHMEHOD authentication-options"
|
||||
gs_guc {set | reload} [-Z NODE-TYPE] [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} [--ignore-node=NODES] -h "HOSTTYPE DATABASE USERNAME IPADDR-WITH-IPMASK AUTHMEHOD authentication-options"
|
||||
gs_guc {set | reload} [-Z NODE-TYPE] [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} [--ignore-node=NODES] -h "HOSTTYPE DATABASE USERNAME HOSTNAME AUTHMEHOD authentication-options"
|
||||
If authentication policy need to set/reload DEFAULT OR COMMENT then provide without authentication menthod, use the form:
|
||||
gs_guc {set | reload} [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} -h "HOSTTYPE DATABASE USERNAME IPADDR IPMASK"
|
||||
gs_guc {set | reload} [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} -h "HOSTTYPE DATABASE USERNAME IPADDR-WITH-IPMASK "
|
||||
gs_guc {set | reload} [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} -h "HOSTTYPE DATABASE USERNAME HOSTNAME"
|
||||
gs_guc {set | reload} [-Z NODE-TYPE] [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} [--ignore-node=NODES] -h "HOSTTYPE DATABASE USERNAME IPADDR IPMASK"
|
||||
gs_guc {set | reload} [-Z NODE-TYPE] [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} [--ignore-node=NODES] -h "HOSTTYPE DATABASE USERNAME IPADDR-WITH-IPMASK "
|
||||
gs_guc {set | reload} [-Z NODE-TYPE] [-N NODE-NAME] {-I INSTANCE-NAME | -D DATADIR} [--ignore-node=NODES] -h "HOSTTYPE DATABASE USERNAME HOSTNAME"
|
||||
|
||||
Encrypt plain text to cipher text:
|
||||
gs_guc encrypt [-M keymode] -K password [-U username] -D DATADIR
|
||||
gs_guc encrypt [-M keymode] -K password [-U username] {-D DATADIR | -R RANDFILEDIR -C CIPHERFILEDIR}
|
||||
|
||||
Generate plain cipher key to cipher text:
|
||||
gs_guc generate [-o prefix] -S cipherkey -D DATADIR
|
||||
@ -54,81 +52,77 @@ Common options:
|
||||
-c parameter=value the parameter to set
|
||||
-c parameter the parameter value to DEFAULT (i.e comments in configuration file)
|
||||
--lcname=LCNAME logical cluter name. It only can be used with datanode
|
||||
--ignore-node=NODES Nodes which need to ignore. It only can be used with set/reload operation,and CN/DN nodetype
|
||||
-h host-auth-policy to set authentication policy in HBA conf file
|
||||
-?, --help show this help, then exit
|
||||
-V, --version output version information, then exit
|
||||
|
||||
Options for set with -c parameter:
|
||||
-Z NODE-TYPE can be "datanode", "cmserver" or "cmagent". NODE-TYPE is used to identify configuration file (with -c parameter) in data directory
|
||||
"datanode" -- postgresql.conf
|
||||
"cmserver" -- cm_server.conf
|
||||
"cmagent" -- cm_agent.conf
|
||||
|
||||
Options for set and reload with -h host-auth-policy:
|
||||
-Z NODE-TYPE can only be "datanode"
|
||||
|
||||
Options for encrypt:
|
||||
-M, --keymode=MODE the cipher files will be applies in server, client or source,default value is server mode
|
||||
-K PASSWORD the plain password you want to encrypt, which length should between 8~16 and at least 3 different types of characters
|
||||
-U, --keyuser=USER if appointed, the cipher files will name with the user name
|
||||
-R RANDFILEDIR set the dir that put the rand file
|
||||
-C CIPHERFILEDIR set the dir that put the cipher file
|
||||
|
||||
|
||||
Options for generate:
|
||||
-o PREFIX the cipher files prefix. default value is obsserver
|
||||
-S CIPHERKEY the plain password you want to encrypt, which length should between 8~16 and at least 3 different types of characters
|
||||
-----Check(GUC)
|
||||
\! @abs_bindir@/gs_guc check -D @abs_srcdir@/tmp_check/datanode1/ -c cstore_buffers
|
||||
--?The gs_guc run with the following arguments: [@abs_bindir@/gs_guc -D @abs_srcdir@/tmp_check/datanode1/ -c cstore_buffers check ].
|
||||
--?.*
|
||||
--?.*
|
||||
--?expected guc information: .*: cstore_buffers=.*
|
||||
--?gs_guc check: .*: cstore_buffers=.*
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc check -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c cstore_buffers
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c cstore_buffers check ].
|
||||
expected guc information: ecs-7159: cstore_buffers=NULL: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc check: ecs-7159: cstore_buffers=512MB: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total GUC values: 1. Failed GUC values: 0.
|
||||
The value of parameter cstore_buffers is same on all instances.
|
||||
--? cstore_buffers=.*
|
||||
cstore_buffers=512MB
|
||||
|
||||
-----Set(GUC)
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "cstore_buffers=10GB"
|
||||
--?The gs_guc run with the following arguments: [@abs_bindir@/gs_guc -D @abs_srcdir@/tmp_check/datanode1/ -c cstore_buffers=10GB set ].
|
||||
--?.*
|
||||
--?.*
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: cstore_buffers=10GB: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "cstore_buffers=10GB"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c cstore_buffers=10GB set ].
|
||||
expected instance path: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: cstore_buffers=10GB: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "enable_beta_opfusion=on"
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: enable_beta_opfusion=on: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "intervalstyle=a"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c intervalstyle=a set ].
|
||||
expected instance path: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: intervalstyle=a: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "enable_beta_nestloop_fusion=on"
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: enable_beta_nestloop_fusion=on: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "enable_beta_opfusion=on"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c enable_beta_opfusion=on set ].
|
||||
expected instance path: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: enable_beta_opfusion=on: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "enable_beta_nestloop_fusion=on"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c enable_beta_nestloop_fusion=on set ].
|
||||
ERROR: The name of parameter "enable_beta_nestloop_fusion" is incorrect. It is not within the CN/DN support parameters or it is a read only parameter.
|
||||
Try "gs_guc --help" for more information.
|
||||
-----Reload(GUC)
|
||||
\! @abs_bindir@/gs_guc reload -D @abs_srcdir@/tmp_check/datanode1/ -c "cstore_buffers=10GB"
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc reload: cstore_buffers=10GB: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc reload -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "cstore_buffers=10GB"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c cstore_buffers=10GB reload ].
|
||||
expected instance path: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc reload: cstore_buffers=10GB: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
server signaled
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "intervalstyle=a"
|
||||
--?The gs_guc run with the following arguments: [@abs_bindir@/gs_guc -D @abs_srcdir@/tmp_check/datanode1/ -c intervalstyle=a set ].
|
||||
--?.*
|
||||
--?.*
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: intervalstyle=a: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "intervalstyle=a"
|
||||
--?The gs_guc run with the following arguments: [@abs_bindir@/gs_guc -D @abs_srcdir@/tmp_check/datanode1/ -c cstore_buffers=10GB reload ].
|
||||
--?.*
|
||||
--?.*
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: intervalstyle=a: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
@ -1,16 +1,15 @@
|
||||
-----gs_guc_reload(GUC) set default value of lockwait_timeout by gs_guc reload
|
||||
--set new value
|
||||
\! @abs_bindir@/gs_guc reload -D @abs_srcdir@/tmp_check/datanode1/ -c "lockwait_timeout=1s"
|
||||
The gs_guc run with the following arguments: [@abs_bindir@/gs_guc -D @abs_srcdir@/tmp_check/datanode1/ -c lockwait_timeout=1s reload ].
|
||||
realpath(@abs_bindir@/..//bin/cluster_static_config) failed : No such file or directory!
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc reload: lockwait_timeout=1s: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc reload -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "lockwait_timeout=1s"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c lockwait_timeout=1s reload ].
|
||||
expected instance path: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc reload: lockwait_timeout=1s: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
server signaled
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
\! sleep 10s
|
||||
\! sleep 3s
|
||||
show lockwait_timeout;
|
||||
lockwait_timeout
|
||||
------------------
|
||||
@ -18,22 +17,19 @@ show lockwait_timeout;
|
||||
(1 row)
|
||||
|
||||
--no assign value
|
||||
\! @abs_bindir@/gs_guc reload -D @abs_srcdir@/tmp_check/datanode1/ -c "lockwait_timeout"
|
||||
The gs_guc run with the following arguments: [@abs_bindir@/gs_guc -D @abs_srcdir@/tmp_check/datanode1/ -c lockwait_timeout reload ].
|
||||
realpath(@abs_bindir@/..//bin/cluster_static_config) failed : No such file or directory!
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
ERROR: lockwait_timeout parameters value is expected
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc reload -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "lockwait_timeout"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c lockwait_timeout reload ].
|
||||
expected instance path: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc reload: #lockwait_timeout: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
server signaled
|
||||
|
||||
Total instances: 1. Failed instances: 1.
|
||||
Failed instance information:
|
||||
--?.*
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
Failure to perform gs_guc!
|
||||
|
||||
\! sleep 10s
|
||||
\! sleep 3s
|
||||
show lockwait_timeout;
|
||||
lockwait_timeout
|
||||
------------------
|
||||
1s
|
||||
20min
|
||||
(1 row)
|
||||
|
||||
|
||||
@ -1,130 +1,146 @@
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "autovacuum_freeze_max_age=8888"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "autovacuum_freeze_max_age=8888"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c autovacuum_freeze_max_age=8888 set ].
|
||||
ERROR: The value 8888 is outside the valid range for parameter "autovacuum_freeze_max_age" (100000 .. 576460752303423487).
|
||||
ERROR: The value "8888" for parameter "autovacuum_freeze_max_age" is incorrect.
|
||||
ERROR: The value "8888" for parameter "autovacuum_freeze_max_age" is incorrect, requires a integer value
|
||||
Try "gs_guc --help" for more information.
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "autovacuum_freeze_max_age=8000000"
|
||||
--?realpath.*
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: autovacuum_freeze_max_age=8000000: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "autovacuum_freeze_max_age=8000000"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c autovacuum_freeze_max_age=8000000 set ].
|
||||
expected instance path: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: autovacuum_freeze_max_age=8000000: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "autovacuum_freeze_max_age=576460752303423488"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "autovacuum_freeze_max_age=576460752303423488"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c autovacuum_freeze_max_age=576460752303423488 set ].
|
||||
ERROR: The value 576460752303423488 is outside the valid range for parameter "autovacuum_freeze_max_age" (100000 .. 576460752303423487).
|
||||
ERROR: The value "576460752303423488" for parameter "autovacuum_freeze_max_age" is incorrect.
|
||||
ERROR: The value "576460752303423488" for parameter "autovacuum_freeze_max_age" is incorrect, requires a integer value
|
||||
Try "gs_guc --help" for more information.
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "bulk_write_ring_size=254789435kB"
|
||||
--?realpath.*
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: bulk_write_ring_size=254789435kB: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "bulk_write_ring_size=254789435kB"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c bulk_write_ring_size=254789435kB set ].
|
||||
expected instance path: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: bulk_write_ring_size=254789435kB: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "bulk_write_ring_size=23546435kN"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "bulk_write_ring_size=23546435kN"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c bulk_write_ring_size=23546435kN set ].
|
||||
ERROR: Valid units for this parameter "bulk_write_ring_size" are "kB", "MB" and "GB".
|
||||
ERROR: The parameter "bulk_write_ring_size" requires an integer value.
|
||||
ERROR: The value "23546435kN" for parameter "bulk_write_ring_size" is incorrect.
|
||||
ERROR: The value "23546435kN" for parameter "bulk_write_ring_size" is incorrect, requires a integer value
|
||||
Try "gs_guc --help" for more information.
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "bulk_write_ring_size=900MB"
|
||||
--?realpath.*
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: bulk_write_ring_size=900MB: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "bulk_write_ring_size=900MB"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c bulk_write_ring_size=900MB set ].
|
||||
expected instance path: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: bulk_write_ring_size=900MB: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "bulk_write_ring_size=2791353MB"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "bulk_write_ring_size=2791353MB"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c bulk_write_ring_size=2791353MB set ].
|
||||
ERROR: The value 2858345472 is outside the valid range for parameter "bulk_write_ring_size" (16384 .. 2147483647).
|
||||
ERROR: The value "2791353MB" for parameter "bulk_write_ring_size" is incorrect.
|
||||
ERROR: The value "2791353MB" for parameter "bulk_write_ring_size" is incorrect, requires a integer value
|
||||
Try "gs_guc --help" for more information.
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "bulk_write_ring_size=9007199254900000MB"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "bulk_write_ring_size=9007199254900000MB"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c bulk_write_ring_size=9007199254900000MB set ].
|
||||
ERROR: The parameter "bulk_write_ring_size" requires an integer value.
|
||||
ERROR: The value "9007199254900000MB" for parameter "bulk_write_ring_size" is incorrect.
|
||||
ERROR: The value "9007199254900000MB" for parameter "bulk_write_ring_size" is incorrect, requires a integer value
|
||||
Try "gs_guc --help" for more information.
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "bulk_write_ring_size=87GB"
|
||||
--?realpath.*
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: bulk_write_ring_size=87GB: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "bulk_write_ring_size=87GB"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c bulk_write_ring_size=87GB set ].
|
||||
expected instance path: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: bulk_write_ring_size=87GB: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "bulk_write_ring_size=8791GB"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "bulk_write_ring_size=8791GB"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c bulk_write_ring_size=8791GB set ].
|
||||
ERROR: The value 9218031616 is outside the valid range for parameter "bulk_write_ring_size" (16384 .. 2147483647).
|
||||
ERROR: The value "8791GB" for parameter "bulk_write_ring_size" is incorrect.
|
||||
ERROR: The value "8791GB" for parameter "bulk_write_ring_size" is incorrect, requires a integer value
|
||||
Try "gs_guc --help" for more information.
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "bulk_write_ring_size=8796093022900GB"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "bulk_write_ring_size=8796093022900GB"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c bulk_write_ring_size=8796093022900GB set ].
|
||||
ERROR: The parameter "bulk_write_ring_size" requires an integer value.
|
||||
ERROR: The value "8796093022900GB" for parameter "bulk_write_ring_size" is incorrect.
|
||||
ERROR: The value "8796093022900GB" for parameter "bulk_write_ring_size" is incorrect, requires a integer value
|
||||
Try "gs_guc --help" for more information.
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "autovacuum_naptime=15372286s"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "autovacuum_naptime=15372286s"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c autovacuum_naptime=15372286s set ].
|
||||
ERROR: The value 15372286 is outside the valid range for parameter "autovacuum_naptime" (1 .. 2147483).
|
||||
ERROR: The value "15372286s" for parameter "autovacuum_naptime" is incorrect.
|
||||
ERROR: The value "15372286s" for parameter "autovacuum_naptime" is incorrect, requires a integer value
|
||||
Try "gs_guc --help" for more information.
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "autovacuum_naptime=254mi"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "autovacuum_naptime=254mi"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c autovacuum_naptime=254mi set ].
|
||||
ERROR: Valid units for this parameter "autovacuum_naptime" are "s", "min", "h", and "d".
|
||||
ERROR: The parameter "autovacuum_naptime" requires an integer value.
|
||||
ERROR: The value "254mi" for parameter "autovacuum_naptime" is incorrect.
|
||||
ERROR: The value "254mi" for parameter "autovacuum_naptime" is incorrect, requires a integer value
|
||||
Try "gs_guc --help" for more information.
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "autovacuum_naptime=153min"
|
||||
--?realpath.*
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: autovacuum_naptime=153min: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "autovacuum_naptime=153min"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c autovacuum_naptime=153min set ].
|
||||
expected instance path: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: autovacuum_naptime=153min: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "autovacuum_naptime=254857min"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "autovacuum_naptime=254857min"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c autovacuum_naptime=254857min set ].
|
||||
ERROR: The value 15291420 is outside the valid range for parameter "autovacuum_naptime" (1 .. 2147483).
|
||||
ERROR: The value "254857min" for parameter "autovacuum_naptime" is incorrect.
|
||||
ERROR: The value "254857min" for parameter "autovacuum_naptime" is incorrect, requires a integer value
|
||||
Try "gs_guc --help" for more information.
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "autovacuum_naptime=1537228672000000000min"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "autovacuum_naptime=1537228672000000000min"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c autovacuum_naptime=1537228672000000000min set ].
|
||||
ERROR: The parameter "autovacuum_naptime" requires an integer value.
|
||||
ERROR: The value "1537228672000000000min" for parameter "autovacuum_naptime" is incorrect.
|
||||
ERROR: The value "1537228672000000000min" for parameter "autovacuum_naptime" is incorrect, requires a integer value
|
||||
Try "gs_guc --help" for more information.
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "autovacuum_naptime=65h"
|
||||
--?realpath.*
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: autovacuum_naptime=65h: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "autovacuum_naptime=65h"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c autovacuum_naptime=65h set ].
|
||||
expected instance path: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: autovacuum_naptime=65h: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "autovacuum_naptime=25645h"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "autovacuum_naptime=25645h"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c autovacuum_naptime=25645h set ].
|
||||
ERROR: The value 92322000 is outside the valid range for parameter "autovacuum_naptime" (1 .. 2147483).
|
||||
ERROR: The value "25645h" for parameter "autovacuum_naptime" is incorrect.
|
||||
ERROR: The value "25645h" for parameter "autovacuum_naptime" is incorrect, requires a integer value
|
||||
Try "gs_guc --help" for more information.
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "autovacuum_naptime=2562047788015216h"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "autovacuum_naptime=2562047788015216h"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c autovacuum_naptime=2562047788015216h set ].
|
||||
ERROR: The parameter "autovacuum_naptime" requires an integer value.
|
||||
ERROR: The value "2562047788015216h" for parameter "autovacuum_naptime" is incorrect.
|
||||
ERROR: The value "2562047788015216h" for parameter "autovacuum_naptime" is incorrect, requires a integer value
|
||||
Try "gs_guc --help" for more information.
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "autovacuum_naptime=5d"
|
||||
--?realpath.*
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: autovacuum_naptime=5d: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "autovacuum_naptime=5d"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c autovacuum_naptime=5d set ].
|
||||
expected instance path: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: autovacuum_naptime=5d: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "autovacuum_naptime=256d"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "autovacuum_naptime=256d"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c autovacuum_naptime=256d set ].
|
||||
ERROR: The value 22118400 is outside the valid range for parameter "autovacuum_naptime" (1 .. 2147483).
|
||||
ERROR: The value "256d" for parameter "autovacuum_naptime" is incorrect.
|
||||
ERROR: The value "256d" for parameter "autovacuum_naptime" is incorrect, requires a integer value
|
||||
Try "gs_guc --help" for more information.
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "autovacuum_naptime=114841866167300d"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "autovacuum_naptime=114841866167300d"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c autovacuum_naptime=114841866167300d set ].
|
||||
ERROR: The parameter "autovacuum_naptime" requires an integer value.
|
||||
ERROR: The value "114841866167300d" for parameter "autovacuum_naptime" is incorrect.
|
||||
ERROR: The value "114841866167300d" for parameter "autovacuum_naptime" is incorrect, requires a integer value
|
||||
Try "gs_guc --help" for more information.
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "bgwriter_lru_multiplier=6.6"
|
||||
--?realpath.*
|
||||
expected instance path: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: bgwriter_lru_multiplier=6.6: [@abs_srcdir@/tmp_check/datanode1/postgresql.conf]
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "bgwriter_lru_multiplier=6.6"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c bgwriter_lru_multiplier=6.6 set ].
|
||||
expected instance path: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
gs_guc set: bgwriter_lru_multiplier=6.6: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/postgresql.conf]
|
||||
|
||||
Total instances: 1. Failed instances: 0.
|
||||
Success to perform gs_guc!
|
||||
|
||||
\! @abs_bindir@/gs_guc set -D @abs_srcdir@/tmp_check/datanode1/ -c "bgwriter_lru_multiplier=11.2"
|
||||
\! /usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc set -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c "bgwriter_lru_multiplier=11.2"
|
||||
The gs_guc run with the following arguments: [/usr3/data1/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data1/jiangyan/openGauss-server//dest/bin/gs_guc -D /usr3/data1/jiangyan/openGauss-server/src/test/regress/tmp_check/datanode1/ -c bgwriter_lru_multiplier=11.2 set ].
|
||||
ERROR: The value 11.2 is outside the valid range for parameter "bgwriter_lru_multiplier" (0 .. 10).
|
||||
ERROR: The value "11.2" for parameter "bgwriter_lru_multiplier" is incorrect.
|
||||
ERROR: The value "11.2" for parameter "bgwriter_lru_multiplier" is incorrect, requires a string value
|
||||
Try "gs_guc --help" for more information.
|
||||
|
||||
@ -19,9 +19,8 @@ CREATE TABLE lineitem_with_null
|
||||
, L_SHIPMODE CHAR(10)
|
||||
, L_COMMENT VARCHAR(44)
|
||||
)
|
||||
with (orientation = column)
|
||||
distribute by hash(L_ORDERKEY);
|
||||
COPY lineitem_with_null FROM '@abs_srcdir@/data/lineitem.data' with (format 'text', delimiter '|', null '');
|
||||
with (orientation = column);
|
||||
COPY lineitem_with_null FROM '/usr3/data1/jiangyan/openGauss-server/src/test/regress/data/lineitem.data' with (format 'text', delimiter '|', null '');
|
||||
analyze lineitem_with_null;
|
||||
analyze lineitem_with_null(L_PARTKEY);
|
||||
analyze lineitem_with_null(L_SHIPMODE);
|
||||
|
||||
@ -1,21 +1,23 @@
|
||||
create schema cstore_btree_index;
|
||||
set current_schema = cstore_btree_index;
|
||||
---
|
||||
--case 1: unsupported index test
|
||||
---
|
||||
DROP TABLE if exists cstore_insert_t1;
|
||||
NOTICE: table "cstore_insert_t1" does not exist, skipping
|
||||
DROP TABLE if exists row_table;
|
||||
NOTICE: table "row_table" does not exist, skipping
|
||||
CREATE TABLE cstore_insert_t1(c1 int, c2 float, c3 text) WITH (orientation = column);
|
||||
COPY cstore_insert_t1 FROM '@abs_srcdir@/data/cstore_copy_t2.data' DELIMITER ',';
|
||||
CREATE UNIQUE INDEX unsupport1_idx ON cstore_insert_t1 using btree(c1);
|
||||
ERROR: access method "cbtree" does not support unique indexes
|
||||
CREATE INDEX CONCURRENTLY unsupport2_idx ON cstore_insert_t1 using btree(c1);
|
||||
ERROR: PGXC does not support concurrent INDEX yet
|
||||
COPY cstore_insert_t1 FROM '/usr3/data1/jiangyan/openGauss-server/src/test/regress/data/cstore_copy_t2.data' DELIMITER ',';
|
||||
CREATE UNIQUE INDEX unsupport1_idx ON cstore_insert_t1(c1);
|
||||
ERROR: access method "psort" does not support unique indexes
|
||||
CREATE INDEX CONCURRENTLY unsupport2_idx ON cstore_insert_t1(c1);
|
||||
ERROR: column store table does not support concurrent INDEX yet
|
||||
DETAIL: The feature is not currently supported
|
||||
CREATE INDEX unsupport3_idx ON cstore_insert_t1 using btree(lower(c2));
|
||||
ERROR: access method "cbtree" does not support index expressions
|
||||
CREATE INDEX unsupport4_idx ON cstore_insert_t1 using btree(c1) where c1 > 1;
|
||||
ERROR: access method "cbtree" does not support WHERE clause
|
||||
CREATE INDEX unsupport5_idx ON cstore_insert_t1 using btree(c2 NULLS FIRST);
|
||||
ERROR: access method "cbtree" does not support NULLS FIRST/LAST options
|
||||
CREATE INDEX unsupport3_idx ON cstore_insert_t1(lower(c2));
|
||||
ERROR: access method "psort" does not support index expressions
|
||||
CREATE INDEX unsupport4_idx ON cstore_insert_t1(c1) where c1 > 1;
|
||||
ERROR: access method "psort" does not support WHERE clause
|
||||
CREATE INDEX unsupport5_idx ON cstore_insert_t1(c2 NULLS FIRST);
|
||||
ERROR: access method "psort" does not support NULLS FIRST/LAST options
|
||||
CREATE INDEX unsupport6_idx ON cstore_insert_t1 USING hash (c1);
|
||||
ERROR: access method "hash" does not support column store
|
||||
CREATE INDEX unsupport7_idx ON cstore_insert_t1 USING gist (c1);
|
||||
@ -23,12 +25,12 @@ ERROR: access method "gist" does not support column store
|
||||
CREATE INDEX unsupport9_idx ON cstore_insert_t1 USING spgist (c1);
|
||||
ERROR: access method "spgist" does not support column store
|
||||
CREATE INDEX unsupport10_idx ON cstore_insert_t1 USING btree (c1);
|
||||
COPY cstore_insert_t1 FROM '@abs_srcdir@/data/cstore_copy_t2.data' DELIMITER ',';
|
||||
DROP TABLE cstore_insert_t1;
|
||||
COPY cstore_insert_t1 FROM '/usr3/data1/jiangyan/openGauss-server/src/test/regress/data/cstore_copy_t2.data' DELIMITER ',';
|
||||
DROP TABLE if exists cstore_insert_t1;
|
||||
CREATE TABLE row_table(c1 int, c2 float, c3 text);
|
||||
CREATE INDEX unsupport11_idx ON row_table USING psort (c1);
|
||||
ERROR: access method "psort" does not support row store
|
||||
DROP TABLE row_table;
|
||||
DROP TABLE if exists row_table;
|
||||
-----------
|
||||
---case 2: partition table create index test
|
||||
-----------
|
||||
@ -53,7 +55,6 @@ CREATE TABLE LINEITEM
|
||||
--, primary key (L_ORDERKEY, L_LINENUMBER)
|
||||
)
|
||||
with (orientation = column)
|
||||
distribute by hash(L_ORDERKEY)
|
||||
PARTITION BY RANGE(L_SHIPDATE)
|
||||
(
|
||||
PARTITION p1 VALUES LESS THAN('1993-01-01 00:00:00'),
|
||||
@ -64,13 +65,13 @@ PARTITION BY RANGE(L_SHIPDATE)
|
||||
PARTITION p6 VALUES LESS THAN('1998-01-01 00:00:00'),
|
||||
PARTITION p7 VALUES LESS THAN('2030-01-01 00:00:00')
|
||||
);
|
||||
COPY LINEITEM FROM '@abs_srcdir@/data/lineitem_index.data' DELIMITER '|';
|
||||
create index idx1 on lineitem using btree(L_ORDERKEY) local;
|
||||
create index idx2 on lineitem using btree(L_PARTKEY) local;
|
||||
create index idx3 on lineitem using btree(L_LINENUMBER, L_SHIPDATE) local;
|
||||
create index idx4 on lineitem using btree(L_RETURNFLAG) local;
|
||||
create index idx5 on lineitem using btree(L_LINESTATUS, L_SHIPINSTRUCT) local;
|
||||
COPY LINEITEM FROM '@abs_srcdir@/data/lineitem_index.data' DELIMITER '|';
|
||||
COPY LINEITEM FROM '/usr3/data1/jiangyan/openGauss-server/src/test/regress/data/lineitem_index.data' DELIMITER '|';
|
||||
create index idx1 on lineitem(L_ORDERKEY) local;
|
||||
create index idx2 on lineitem(L_PARTKEY) local;
|
||||
create index idx3 on lineitem(L_LINENUMBER, L_SHIPDATE) local;
|
||||
create index idx4 on lineitem(L_RETURNFLAG) local;
|
||||
create index idx5 on lineitem(L_LINESTATUS, L_SHIPINSTRUCT) local;
|
||||
COPY LINEITEM FROM '/usr3/data1/jiangyan/openGauss-server/src/test/regress/data/lineitem_index.data' DELIMITER '|';
|
||||
set enable_bitmapscan=off;
|
||||
set enable_seqscan=off;
|
||||
select count(*) from lineitem where L_ORDERKEY > 100 and L_ORDERKEY < 200;
|
||||
@ -80,42 +81,38 @@ select count(*) from lineitem where L_ORDERKEY > 100 and L_ORDERKEY < 200;
|
||||
(1 row)
|
||||
|
||||
truncate table lineitem;
|
||||
drop index idx1;
|
||||
drop index idx2;
|
||||
drop index idx3;
|
||||
drop index idx4;
|
||||
drop index idx5;
|
||||
drop table lineitem;
|
||||
-------
|
||||
--- case 8: index scan with none partition hit
|
||||
-------
|
||||
CREATE TABLE partition_none (
|
||||
a1 character varying(1000),
|
||||
a2 integer,
|
||||
a3 character varying(1000),
|
||||
a4 integer,
|
||||
a5 character varying(1000),
|
||||
a6 integer,
|
||||
a7 character varying(1000),
|
||||
a8 integer,
|
||||
a9 character varying(1000),
|
||||
a10 integer
|
||||
)
|
||||
WITH (orientation=column)
|
||||
DISTRIBUTE BY HASH (a4)
|
||||
PARTITION BY RANGE (a2)
|
||||
(
|
||||
PARTITION p1 VALUES LESS THAN (1),
|
||||
PARTITION p50001 VALUES LESS THAN (50001),
|
||||
PARTITION p100001 VALUES LESS THAN (100001),
|
||||
PARTITION p150001 VALUES LESS THAN (150001),
|
||||
PARTITION p200001 VALUES LESS THAN (200001),
|
||||
PARTITION p250001 VALUES LESS THAN (250001));
|
||||
create index aii on partition_none using btree(a9) local;
|
||||
SELECT a1, a9 FROM /*TaRgET*/ partition_none WHERE a5='ata l' AND 6793839=a2 AND a2=6159730 AND a9='da' ORDER BY a1, a9;
|
||||
a1 | a9
|
||||
----+----
|
||||
drop index if exists idx1;
|
||||
drop index if exists idx2;
|
||||
drop index if exists idx3;
|
||||
drop index if exists idx4;
|
||||
drop index if exists idx5;
|
||||
drop table if exists lineitem;
|
||||
----
|
||||
--case 3: check reserve column
|
||||
----
|
||||
CREATE TABLE check_column(id int, tid int);
|
||||
ERROR: column name "tid" conflicts with a system column name
|
||||
CREATE TABLE check_column(id int, tid_test int, ti int);
|
||||
ALTER TABLE check_column ADD COLUMN tid int;
|
||||
ERROR: column name "tid" conflicts with a system column name
|
||||
drop table if exists check_column;
|
||||
-----
|
||||
--- case 6: truncate and delete cstore relation with index
|
||||
-----
|
||||
create table IDEX_PARTITION_TABLE_001(COL_INT int) with(orientation=column);
|
||||
CREATE INDEX STORAGE_IDEX_PARTITION_IDEX_001 ON IDEX_PARTITION_TABLE_001(COL_INT);
|
||||
insert into IDEX_PARTITION_TABLE_001 values(1000);
|
||||
truncate table IDEX_PARTITION_TABLE_001;
|
||||
select * from IDEX_PARTITION_TABLE_001;
|
||||
col_int
|
||||
---------
|
||||
(0 rows)
|
||||
|
||||
drop table partition_none;
|
||||
drop schema cstore_btree_index cascade;
|
||||
insert into IDEX_PARTITION_TABLE_001 values(1000);
|
||||
delete from IDEX_PARTITION_TABLE_001 where col_int=1000;
|
||||
select * from IDEX_PARTITION_TABLE_001 where col_int=1000;
|
||||
col_int
|
||||
---------
|
||||
(0 rows)
|
||||
|
||||
drop table if exists IDEX_PARTITION_TABLE_001;
|
||||
|
||||
@ -22,7 +22,7 @@ create table row_index_tbl(
|
||||
,num2 decimal
|
||||
,serial1 int
|
||||
,interval1 interval
|
||||
,interval2 tinterval) distribute by hash(id2);
|
||||
,interval2 tinterval);
|
||||
insert into row_index_tbl values(10,400,2000,40000,1,111111,1.1,'a','aa','bb','cc','dd','ff','1996-02-12','1984-2-6 01:00:30+8','02:05:36',30.12,0.03,2147483647,'2 day 13:34:56','["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]');
|
||||
insert into row_index_tbl values(20,300,3000,10000,2,222222,2.2,'b','ee','cc','dd','aa','hh','1998-03-24','1986-2-6 03:00:30+8','04:36:25',20.15,0.06,-2147483647,'1 day 18:34:56','["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]');
|
||||
insert into row_index_tbl values(30,200,4000,30000,3,333333,3.3,'c','cc','bb','aa','ee','gg','1997-05-26','1987-2-6 08:00:30+8','06:36:18',34.36,0.07,2136483647,'18 day 14:34:56','["Feb 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]');
|
||||
@ -48,64 +48,58 @@ create table cstore_index_tbl(
|
||||
,num2 decimal
|
||||
,serial1 int
|
||||
,interval1 interval
|
||||
,interval2 tinterval)with(orientation=column) distribute by hash(id2);
|
||||
,interval2 tinterval)with(orientation=column);
|
||||
insert into cstore_index_tbl select * from row_index_tbl;
|
||||
select ctid from cstore_index_tbl order by 1;
|
||||
ctid
|
||||
----------
|
||||
(1001,1)
|
||||
(1001,1)
|
||||
(1001,1)
|
||||
(1001,1)
|
||||
(1001,2)
|
||||
(1001,3)
|
||||
(1001,4)
|
||||
(4 rows)
|
||||
|
||||
create index idx_int1 on cstore_index_tbl using btree(id1);
|
||||
create index idx_int2 on cstore_index_tbl using btree(id2);
|
||||
create index idx_int4 on cstore_index_tbl using btree(id4);
|
||||
create index idx_int8 on cstore_index_tbl using btree(id8);
|
||||
create index idx_int on cstore_index_tbl using btree(int1);
|
||||
create index idx_bigint on cstore_index_tbl using btree(bint);
|
||||
create index idx_float on cstore_index_tbl using btree(flag);
|
||||
create index idx_varchar on cstore_index_tbl using btree(name1);
|
||||
create index idx_varchar2 on cstore_index_tbl using btree(name2);
|
||||
create index idx_nvarchar2 on cstore_index_tbl using btree(name3);
|
||||
create index idx_text on cstore_index_tbl using btree(name4);
|
||||
create index idx_date on cstore_index_tbl using btree(time1);
|
||||
create index idx_timetz on cstore_index_tbl using btree(time2);
|
||||
create index idx_time on cstore_index_tbl using btree(time3);
|
||||
create index idx_float8 on cstore_index_tbl using btree(num1);
|
||||
create index idx_decimal on cstore_index_tbl using btree(num2);
|
||||
create index idx_serial on cstore_index_tbl using btree(serial1);
|
||||
create index idx_interval on cstore_index_tbl using btree(interval1);
|
||||
create index idx_tinterval on cstore_index_tbl using btree(interval2);
|
||||
create index idx_id4_name1 on cstore_index_tbl using btree(id4,name1);
|
||||
create index idx_id4_name2 on cstore_index_tbl using btree(id4,name2);
|
||||
create index idx_id4_name3 on cstore_index_tbl using btree(id4,name3);
|
||||
create index idx_id4_name4 on cstore_index_tbl using btree(id4,name4);
|
||||
create index idx_bint_flag on cstore_index_tbl using btree(bint,flag);
|
||||
create index idx_int1_time on cstore_index_tbl using btree(int1,time3);
|
||||
create index idx_time1_name2 on cstore_index_tbl using btree(time1,name2);
|
||||
create index idx_id4_time2 on cstore_index_tbl using btree(id4,time2);
|
||||
create index idx_num1_time2 on cstore_index_tbl using btree(num1,time2);
|
||||
create index idx_id4_num2 on cstore_index_tbl using btree(id4,num2);
|
||||
create index idx_name1_name2 on cstore_index_tbl using btree(name1,name2);
|
||||
create index idx_time1_interval1 on cstore_index_tbl using btree(time1,interval1);
|
||||
create index idx_int1 on cstore_index_tbl(id1);
|
||||
create index idx_int2 on cstore_index_tbl(id2);
|
||||
create index idx_int4 on cstore_index_tbl(id4);
|
||||
create index idx_int8 on cstore_index_tbl(id8);
|
||||
create index idx_int on cstore_index_tbl(int1);
|
||||
create index idx_bigint on cstore_index_tbl(bint);
|
||||
create index idx_float on cstore_index_tbl(flag);
|
||||
create index idx_varchar on cstore_index_tbl(name1);
|
||||
create index idx_varchar2 on cstore_index_tbl(name2);
|
||||
create index idx_nvarchar2 on cstore_index_tbl(name3);
|
||||
create index idx_text on cstore_index_tbl(name4);
|
||||
create index idx_date on cstore_index_tbl(time1);
|
||||
create index idx_timetz on cstore_index_tbl(time2);
|
||||
create index idx_time on cstore_index_tbl(time3);
|
||||
create index idx_float8 on cstore_index_tbl(num1);
|
||||
create index idx_decimal on cstore_index_tbl(num2);
|
||||
create index idx_serial on cstore_index_tbl(serial1);
|
||||
create index idx_interval on cstore_index_tbl(interval1);
|
||||
create index idx_tinterval on cstore_index_tbl(interval2);
|
||||
create index idx_id4_name1 on cstore_index_tbl(id4,name1);
|
||||
create index idx_id4_name2 on cstore_index_tbl(id4,name2);
|
||||
create index idx_id4_name3 on cstore_index_tbl(id4,name3);
|
||||
create index idx_id4_name4 on cstore_index_tbl(id4,name4);
|
||||
create index idx_bint_flag on cstore_index_tbl(bint,flag);
|
||||
create index idx_int1_time on cstore_index_tbl(int1,time3);
|
||||
create index idx_time1_name2 on cstore_index_tbl(time1,name2);
|
||||
create index idx_id4_time2 on cstore_index_tbl(id4,time2);
|
||||
create index idx_num1_time2 on cstore_index_tbl(num1,time2);
|
||||
create index idx_id4_num2 on cstore_index_tbl(id4,num2);
|
||||
create index idx_name1_name2 on cstore_index_tbl(name1,name2);
|
||||
create index idx_time1_interval1 on cstore_index_tbl(time1,interval1);
|
||||
set enable_seqscan=off;
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where id2 > 100;
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_int2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_int2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: (cstore_index_tbl.id2 > 100)
|
||||
(9 rows)
|
||||
Index Cond: (cstore_index_tbl.id2 > 100)
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where id2 > 100 order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -116,20 +110,14 @@ select * from cstore_index_tbl where id2 > 100 order by id2;
|
||||
(3 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where id4 > 1000;
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.id4) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_id4_num2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_id4_num2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: (cstore_index_tbl.id4 > 1000)
|
||||
(9 rows)
|
||||
Index Cond: (cstore_index_tbl.id4 > 1000)
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where id4 > 1000 order by id4;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -140,20 +128,14 @@ select * from cstore_index_tbl where id4 > 1000 order by id4;
|
||||
(3 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where id8 > 10000;
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.id8) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_int8 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_int8 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: (cstore_index_tbl.id8 > 10000)
|
||||
(9 rows)
|
||||
Index Cond: (cstore_index_tbl.id8 > 10000)
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where id8 > 10000 order by id8;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -164,20 +146,14 @@ select * from cstore_index_tbl where id8 > 10000 order by id8;
|
||||
(3 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where name1 > 'aa';
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.name1) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_name1_name2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_name1_name2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: ((cstore_index_tbl.name1)::text > 'aa'::text)
|
||||
(9 rows)
|
||||
Index Cond: ((cstore_index_tbl.name1)::text > 'aa'::text)
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where name1 > 'aa' order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -188,20 +164,14 @@ select * from cstore_index_tbl where name1 > 'aa' order by id2;
|
||||
(3 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where name2 > 'aa';
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.name2) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_name1_name2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_name1_name2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: ((cstore_index_tbl.name2)::text > 'aa'::text)
|
||||
(9 rows)
|
||||
Index Cond: ((cstore_index_tbl.name2)::text > 'aa'::text)
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where name2 > 'aa' order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -213,20 +183,14 @@ select * from cstore_index_tbl where name2 > 'aa' order by id2;
|
||||
(4 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where name3 > 'aa';
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.name3) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_id4_name3 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_id4_name3 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: ((cstore_index_tbl.name3)::text > 'aa'::text)
|
||||
(9 rows)
|
||||
Index Cond: ((cstore_index_tbl.name3)::text > 'aa'::text)
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where name3 > 'aa' order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -236,20 +200,14 @@ select * from cstore_index_tbl where name3 > 'aa' order by id2;
|
||||
(2 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where name4 > 'aa';
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.name4) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_id4_name4 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_id4_name4 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: (cstore_index_tbl.name4 > 'aa'::text)
|
||||
(9 rows)
|
||||
Index Cond: (cstore_index_tbl.name4 > 'aa'::text)
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where name4 > 'aa' order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -260,20 +218,14 @@ select * from cstore_index_tbl where name4 > 'aa' order by id2;
|
||||
(3 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where time1 > '1992-01-30';
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.time1) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_time1_interval1 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_time1_interval1 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: (cstore_index_tbl.time1 > 'Thu Jan 30 00:00:00 1992'::timestamp without time zone)
|
||||
(9 rows)
|
||||
Index Cond: (cstore_index_tbl.time1 > 'Thu Jan 30 00:00:00 1992'::timestamp without time zone)
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where time1 > '1992-01-30' order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -284,20 +236,14 @@ select * from cstore_index_tbl where time1 > '1992-01-30' order by id2;
|
||||
(3 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where time2 > '1984-2-6 01:00:30+8';
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.time2) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_num1_time2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_num1_time2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: (cstore_index_tbl.time2 > '01:00:30+08'::time with time zone)
|
||||
(9 rows)
|
||||
Index Cond: (cstore_index_tbl.time2 > '01:00:30+08'::time with time zone)
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where time2 > '1984-2-6 01:00:30+8' order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -308,20 +254,14 @@ select * from cstore_index_tbl where time2 > '1984-2-6 01:00:30+8' order by id2;
|
||||
(3 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where num1 > 20.20;
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.num1) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_num1_time2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_num1_time2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: (cstore_index_tbl.num1 > 20.2::double precision)
|
||||
(9 rows)
|
||||
Index Cond: (cstore_index_tbl.num1 > 20.2::double precision)
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where num1 > 20.20 order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -332,20 +272,14 @@ select * from cstore_index_tbl where num1 > 20.20 order by id2;
|
||||
(3 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where num2 > 0.05;
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.num2) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_id4_num2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_id4_num2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: (cstore_index_tbl.num2 > .05)
|
||||
(9 rows)
|
||||
Index Cond: (cstore_index_tbl.num2 > .05)
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where num2 > 0.05 order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -355,20 +289,14 @@ select * from cstore_index_tbl where num2 > 0.05 order by id2;
|
||||
(2 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where serial1 > -2136483647;
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.serial1) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_serial on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_serial on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: (cstore_index_tbl.serial1 > (-2136483647))
|
||||
(9 rows)
|
||||
Index Cond: (cstore_index_tbl.serial1 > (-2136483647))
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where serial1 > -2136483647 order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -378,20 +306,14 @@ select * from cstore_index_tbl where serial1 > -2136483647 order by id2;
|
||||
(2 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where interval1 > '1 day 18:34:56';
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.interval1) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_time1_interval1 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_time1_interval1 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: (cstore_index_tbl.interval1 > '@ 1 day 18 hours 34 mins 56 secs'::interval)
|
||||
(9 rows)
|
||||
Index Cond: (cstore_index_tbl.interval1 > '@ 1 day 18 hours 34 mins 56 secs'::interval)
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where interval1 > '1 day 18:34:56' order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -402,20 +324,14 @@ select * from cstore_index_tbl where interval1 > '1 day 18:34:56' order by id2;
|
||||
(3 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where interval2 > '["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]';
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.interval2) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_tinterval on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_tinterval on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: (cstore_index_tbl.interval2 > '["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]'::tinterval)
|
||||
(9 rows)
|
||||
Index Cond: (cstore_index_tbl.interval2 > '["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]'::tinterval)
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where interval2 > '["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]' order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -426,21 +342,15 @@ select * from cstore_index_tbl where interval2 > '["Sep 4, 1983 23:59:12" "Oct 4
|
||||
(3 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where id2 > 100 and name1 > 'aa';
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.name1) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_name1_name2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_name1_name2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: ((cstore_index_tbl.name1)::text > 'aa'::text)
|
||||
Filter: (cstore_index_tbl.id2 > 100)
|
||||
(10 rows)
|
||||
Index Cond: ((cstore_index_tbl.name1)::text > 'aa'::text)
|
||||
Filter: (cstore_index_tbl.id2 > 100)
|
||||
(6 rows)
|
||||
|
||||
select * from cstore_index_tbl where id2 > 100 and name1 > 'aa' order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -450,20 +360,14 @@ select * from cstore_index_tbl where id2 > 100 and name1 > 'aa' order by id2;
|
||||
(2 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where id4 > 1000 and name2 > 'aa';
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.id4, public.cstore_index_tbl.name2) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_id4_name2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_id4_name2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: ((cstore_index_tbl.id4 > 1000) AND ((cstore_index_tbl.name2)::text > 'aa'::text))
|
||||
(9 rows)
|
||||
Index Cond: ((cstore_index_tbl.id4 > 1000) AND ((cstore_index_tbl.name2)::text > 'aa'::text))
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where id4 > 1000 and name2 > 'aa' order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -474,21 +378,15 @@ select * from cstore_index_tbl where id4 > 1000 and name2 > 'aa' order by id2;
|
||||
(3 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where num1 > 20.5 and name3 > 'aa';
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.num1, public.cstore_index_tbl.name3) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_num1_time2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_num1_time2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: (cstore_index_tbl.num1 > 20.5::double precision)
|
||||
Filter: ((cstore_index_tbl.name3)::text > 'aa'::text)
|
||||
(10 rows)
|
||||
Index Cond: (cstore_index_tbl.num1 > 20.5::double precision)
|
||||
Filter: ((cstore_index_tbl.name3)::text > 'aa'::text)
|
||||
(6 rows)
|
||||
|
||||
select * from cstore_index_tbl where num1 > 20.5 and name3 > 'aa' order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -497,21 +395,15 @@ select * from cstore_index_tbl where num1 > 20.5 and name3 > 'aa' order by id2;
|
||||
(1 row)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where id4 > 1000 and time1 > '1992-01-30';
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.id4, public.cstore_index_tbl.time1) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_time1_interval1 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_time1_interval1 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: (cstore_index_tbl.time1 > 'Thu Jan 30 00:00:00 1992'::timestamp without time zone)
|
||||
Filter: (cstore_index_tbl.id4 > 1000)
|
||||
(10 rows)
|
||||
Index Cond: (cstore_index_tbl.time1 > 'Thu Jan 30 00:00:00 1992'::timestamp without time zone)
|
||||
Filter: (cstore_index_tbl.id4 > 1000)
|
||||
(6 rows)
|
||||
|
||||
select * from cstore_index_tbl where id4 > 1000 and time1 > '1992-01-30' order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -522,25 +414,18 @@ select * from cstore_index_tbl where id4 > 1000 and time1 > '1992-01-30' order b
|
||||
(3 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where flag > 'a' and time3 < '08:21:53' order by id2;
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.flag, public.cstore_index_tbl.time3) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> Vector Sort
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Merge Sort Key: cstore_index_tbl.id2
|
||||
Node/s: All datanodes
|
||||
-> Vector Sort
|
||||
Sort Key: cstore_index_tbl.id2
|
||||
-> CStore Index Scan using idx_int1_time on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Sort Key: cstore_index_tbl.id2
|
||||
-> CStore Index Scan using idx_int1_time on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: (cstore_index_tbl.time3 < '08:21:53'::time without time zone)
|
||||
Filter: (cstore_index_tbl.flag > 'a'::bpchar)
|
||||
(14 rows)
|
||||
Index Cond: (cstore_index_tbl.time3 < '08:21:53'::time without time zone)
|
||||
Filter: (cstore_index_tbl.flag > 'a'::bpchar)
|
||||
(9 rows)
|
||||
|
||||
select * from cstore_index_tbl where flag > 'a' and time3 < '08:21:53' order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -550,20 +435,14 @@ select * from cstore_index_tbl where flag > 'a' and time3 < '08:21:53' order by
|
||||
(2 rows)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where name1 > 'aa' and name2 > 'bb';
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.name1, public.cstore_index_tbl.name2) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_name1_name2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_name1_name2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: (((cstore_index_tbl.name1)::text > 'aa'::text) AND ((cstore_index_tbl.name2)::text > 'bb'::text))
|
||||
(9 rows)
|
||||
Index Cond: (((cstore_index_tbl.name1)::text > 'aa'::text) AND ((cstore_index_tbl.name2)::text > 'bb'::text))
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where name1 > 'aa' and name2 > 'bb' order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -572,20 +451,14 @@ select * from cstore_index_tbl where name1 > 'aa' and name2 > 'bb' order by id2;
|
||||
(1 row)
|
||||
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where time1 > '1996-02-12' and interval1 < '2 day 13:34:56';
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.time1, public.cstore_index_tbl.interval1) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_time1_interval1 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_time1_interval1 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: ((cstore_index_tbl.time1 > 'Mon Feb 12 00:00:00 1996'::timestamp without time zone) AND (cstore_index_tbl.interval1 < '@ 2 days 13 hours 34 mins 56 secs'::interval))
|
||||
(9 rows)
|
||||
Index Cond: ((cstore_index_tbl.time1 > 'Mon Feb 12 00:00:00 1996'::timestamp without time zone) AND (cstore_index_tbl.interval1 < '@ 2 days 13 hours 34 mins 56 secs'::interval))
|
||||
(5 rows)
|
||||
|
||||
select * from cstore_index_tbl where time1 > '1996-02-12' and interval1 < '2 day 13:34:56' order by id2;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -627,21 +500,15 @@ drop index idx_time1_interval1;
|
||||
drop index idx_bint_flag;
|
||||
set enable_seqscan=off;
|
||||
explain (verbose on, costs off) select * from cstore_index_tbl where id2 >100 and name1 < 'dd' and num1=30.12;
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.id2, public.cstore_index_tbl.name1, public.cstore_index_tbl.num1) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Scan using idx_int2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Scan using idx_int2 on public.cstore_index_tbl
|
||||
Output: id1, id2, id4, id8, int1, bint, f1, flag, name1, name2, name3, name4, name5, time1, time2, time3, num1, num2, serial1, interval1, interval2
|
||||
Distribute Key: id2
|
||||
Index Cond: (cstore_index_tbl.id2 > 100)
|
||||
Filter: (((cstore_index_tbl.name1)::text < 'dd'::text) AND (cstore_index_tbl.num1 = 30.12::double precision))
|
||||
(10 rows)
|
||||
Index Cond: (cstore_index_tbl.id2 > 100)
|
||||
Filter: (((cstore_index_tbl.name1)::text < 'dd'::text) AND (cstore_index_tbl.num1 = 30.12::double precision))
|
||||
(6 rows)
|
||||
|
||||
select * from cstore_index_tbl where id2 >100 and name1 < 'dd' and num1=30.12;
|
||||
id1 | id2 | id4 | id8 | int1 | bint | f1 | flag | name1 | name2 | name3 | name4 | name5 | time1 | time2 | time3 | num1 | num2 | serial1 | interval1 | interval2
|
||||
@ -652,52 +519,26 @@ select * from cstore_index_tbl where id2 >100 and name1 < 'dd' and num1=30.12;
|
||||
drop index idx_int2;
|
||||
drop table row_index_tbl;
|
||||
drop table cstore_index_tbl;
|
||||
-----
|
||||
--- case 6: truncate and delete cstore relation with index
|
||||
-----
|
||||
create table IDEX_PARTITION_TABLE_001(COL_INT int) with(orientation=column);
|
||||
CREATE INDEX STORAGE_IDEX_PARTITION_IDEX_001 ON IDEX_PARTITION_TABLE_001 using btree(COL_INT);
|
||||
insert into IDEX_PARTITION_TABLE_001 values(1000);
|
||||
truncate table IDEX_PARTITION_TABLE_001;
|
||||
select * from IDEX_PARTITION_TABLE_001;
|
||||
col_int
|
||||
---------
|
||||
(0 rows)
|
||||
|
||||
insert into IDEX_PARTITION_TABLE_001 values(1000);
|
||||
delete from IDEX_PARTITION_TABLE_001 where col_int=1000;
|
||||
select * from IDEX_PARTITION_TABLE_001 where col_int=1000;
|
||||
col_int
|
||||
---------
|
||||
(0 rows)
|
||||
|
||||
drop table IDEX_PARTITION_TABLE_001;
|
||||
----
|
||||
--- case 7: two indexes with the same column
|
||||
----
|
||||
create table row_index_tbl(c1 int,c2 int,c3 int) distribute by hash(c1);
|
||||
create table row_index_tbl(c1 int,c2 int,c3 int) ;
|
||||
insert into row_index_tbl values(0,1,2);
|
||||
insert into row_index_tbl values(3,4,5);
|
||||
insert into row_index_tbl values(6,7,8);
|
||||
insert into row_index_tbl values(9,10,11);
|
||||
create table cstore_index_tbl(c1 int,c2 int,c3 int) with (orientation = column) distribute by hash(c1);
|
||||
create table cstore_index_tbl(c1 int,c2 int,c3 int) with (orientation = column) ;
|
||||
insert into cstore_index_tbl select * from row_index_tbl;
|
||||
create index idx_c2 on cstore_index_tbl using btree(c2);
|
||||
create index idx_c2 on cstore_index_tbl(c2);
|
||||
explain (verbose on, costs off) SELECT c2 FROM cstore_index_tbl WHERE c2 > 2 and c2 < 9;
|
||||
WARNING: Statistics in some tables or columns(public.cstore_index_tbl.c1, public.cstore_index_tbl.c2) are not collected.
|
||||
HINT: Do analyze for them in order to generate optimized plan.
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: c2
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> CStore Index Only Scan using idx_c2 on public.cstore_index_tbl
|
||||
Output: c2
|
||||
Node/s: All datanodes
|
||||
-> CStore Index Only Scan using idx_c2 on public.cstore_index_tbl
|
||||
Output: c2
|
||||
Distribute Key: c1
|
||||
Index Cond: ((cstore_index_tbl.c2 > 2) AND (cstore_index_tbl.c2 < 9))
|
||||
(9 rows)
|
||||
Index Cond: ((cstore_index_tbl.c2 > 2) AND (cstore_index_tbl.c2 < 9))
|
||||
(5 rows)
|
||||
|
||||
SELECT c2 FROM cstore_index_tbl WHERE c2 > 2 and c2 < 9 order by c2;
|
||||
c2
|
||||
@ -708,6 +549,37 @@ SELECT c2 FROM cstore_index_tbl WHERE c2 > 2 and c2 < 9 order by c2;
|
||||
|
||||
drop table row_index_tbl;
|
||||
drop table cstore_index_tbl;
|
||||
-------
|
||||
--- case 8: index scan with none partition hit
|
||||
-------
|
||||
CREATE TABLE partition_none (
|
||||
a1 character varying(1000),
|
||||
a2 integer,
|
||||
a3 character varying(1000),
|
||||
a4 integer,
|
||||
a5 character varying(1000),
|
||||
a6 integer,
|
||||
a7 character varying(1000),
|
||||
a8 integer,
|
||||
a9 character varying(1000),
|
||||
a10 integer
|
||||
)
|
||||
WITH (orientation=column)
|
||||
PARTITION BY RANGE (a2)
|
||||
(
|
||||
PARTITION p1 VALUES LESS THAN (1),
|
||||
PARTITION p50001 VALUES LESS THAN (50001),
|
||||
PARTITION p100001 VALUES LESS THAN (100001),
|
||||
PARTITION p150001 VALUES LESS THAN (150001),
|
||||
PARTITION p200001 VALUES LESS THAN (200001),
|
||||
PARTITION p250001 VALUES LESS THAN (250001));
|
||||
create index aii on partition_none(a9) local;
|
||||
SELECT a1, a9 FROM /*TaRgET*/ partition_none WHERE a5='ata l' AND 6793839=a2 AND a2=6159730 AND a9='da' ORDER BY a1, a9;
|
||||
a1 | a9
|
||||
----+----
|
||||
(0 rows)
|
||||
|
||||
drop table partition_none;
|
||||
----
|
||||
--- case 9: index scan with partition number be zero
|
||||
----
|
||||
@ -726,9 +598,9 @@ PARTITION BY RANGE(c_date_1)
|
||||
(
|
||||
PARTITION COMPRESS_TABLE_INTEVAL_1 VALUES LESS THAN('2012-8-23')
|
||||
);
|
||||
CREATE INDEX INDEX_COMPRESS_1 ON COMPRESS_TABLE_INDEX using btree(C_INT_2) LOCAL;
|
||||
CREATE INDEX INDEX_COMPRESS_2 ON COMPRESS_TABLE_INDEX using btree(C_DATE_1) LOCAL;
|
||||
CREATE INDEX INDEX_COMPRESS_3 ON COMPRESS_TABLE_INDEX using btree(C_INT_1) LOCAL;
|
||||
CREATE INDEX INDEX_COMPRESS_1 ON COMPRESS_TABLE_INDEX(C_INT_2) LOCAL;
|
||||
CREATE INDEX INDEX_COMPRESS_2 ON COMPRESS_TABLE_INDEX(C_DATE_1) LOCAL;
|
||||
CREATE INDEX INDEX_COMPRESS_3 ON COMPRESS_TABLE_INDEX(C_INT_1) LOCAL;
|
||||
SELECT COUNT(*) FROM COMPRESS_TABLE_INDEX WHERE C_DATE_1>='2012-09-01' AND C_DATE_1<'2012-9-20';
|
||||
count
|
||||
-------
|
||||
@ -736,93 +608,3 @@ SELECT COUNT(*) FROM COMPRESS_TABLE_INDEX WHERE C_DATE_1>='2012-09-01' AND C_DAT
|
||||
(1 row)
|
||||
|
||||
drop table COMPRESS_TABLE_INDEX;
|
||||
----
|
||||
--- case 10:index scan with qual push down
|
||||
----
|
||||
set datestyle to iso;
|
||||
SET IntervalStyle to postgres;
|
||||
set time zone PRC;
|
||||
CREATE TABLE PARTITION_SELECT_PICT_TABLE(
|
||||
C_CHAR_3 CHAR(102400),
|
||||
C_VARCHAR_3 VARCHAR(1024),
|
||||
C_INT INTEGER,
|
||||
C_NUMERIC numeric(10,5),
|
||||
C_TS_WITHOUT TIMESTAMP WITHOUT TIME ZONE)
|
||||
DISTRIBUTE BY HASH(C_CHAR_3)
|
||||
partition by range (C_CHAR_3,C_VARCHAR_3,C_INT,C_TS_WITHOUT)
|
||||
(
|
||||
partition PARTITION_SELECT_PICT_1 values less than ('DEFGHIJ', 'defghij', 444, '2000-04-04 04:04:04'),
|
||||
partition PARTITION_SELECT_PICT_2 values less than ('GHIJKLM', 'ghijklm', 777, '2000-07-07 07:07:07'),
|
||||
partition PARTITION_SELECT_PICT_3 values less than ('MJKLMNO', 'ijklmno', 999, '2000-09-09 09:09:09')
|
||||
);
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('ABCDEFG','abcdefg',111,111.1,'2000-01-01 01:01:01');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('BCDEFGH','bcdefgh',222,222.2,'2000-02-02 02:02:02');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('CDEFGHI','cdefghi',333,333.3,'2000-03-03 03:03:03');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('DEFGHIJ','defghij',444,444.4,'2000-04-04 04:04:04');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('EFGHIJK','efghijk',555,555.5,'2000-05-05 05:05:05');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('FGHIJKL','fghijkl',666,666.6,'2000-06-06 06:06:06');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('ABCDEFG',null,111,111.1,'2000-01-01 01:01:01');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('ABCDEFG',null,null,null,null);
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('ABCDEFG','abcdefg',null,111.1,'2000-01-01 01:01:01');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('BCDEFGH','bcdefgh',null,null,'2000-02-02 02:02:02');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('BCDEFGH',null,222,null,'2000-02-02 02:02:02');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('CDEFGHI','cdefghi',333,null,'2000-03-03 03:03:03');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('EFGHIJK',null,null,555.5,'2000-05-05 05:05:05');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('FGHIJKL','fghijkl',null,null,null);
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('A'||generate_series(1,5),'a'||generate_series(1,5),generate_series(1,5),cast( generate_series(1,5)||'.111' as numeric(10,5)),cast('2000-01-'||generate_series(1,5)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('B'||generate_series(101,103),'b'||generate_series(101,103),generate_series(101,103),cast(generate_series(101,103)||'.111' as numeric(10,5)),cast('2000-02-'||generate_series(1,3)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('C'||generate_series(201,205),'c'||generate_series(201,205),generate_series(201,205),cast(generate_series(201,205)||'.111' as numeric(10,5)),cast('2000-03-'||generate_series(1,5)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('D'||generate_series(301,303),'d'||generate_series(301,303),generate_series(301,303),cast(generate_series(301,303)||'.111' as numeric(10,5)),cast('2000-04-'||generate_series(1,3)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('DE'||generate_series(401,405),'de'||generate_series(401,405),generate_series(401,405),cast(generate_series(401,405)||'.111' as numeric(10,5)),cast('2000-05-'||generate_series(1,5)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('E'||generate_series(501,504),'e'||generate_series(501,504),generate_series(501,504),cast( generate_series(501,504)||'.222' as numeric(10,5)),cast('2000-01-'||generate_series(1,4)||' 13:13:13' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('F'||generate_series(601,603),'f'||generate_series(601,603),generate_series(601,603),cast(generate_series(601,603)||'.222' as numeric(10,5)),cast('2000-02-'||generate_series(1,3)||' 13:13:13' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('G'||generate_series(701,705),'g'||generate_series(701,705),generate_series(701,705),cast(generate_series(701,705)||'.222' as numeric(10,5)),cast('2000-03-'||generate_series(1,5)||' 13:13:13' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('GH'||generate_series(801,803),'gh'||generate_series(801,803),generate_series(801,803),cast(generate_series(801,803)||'.222' as numeric(10,5)),cast('2000-04-'||generate_series(1,3)||' 13:13:13' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
CREATE TABLE VECTOR_PARTITION_SELECT_PICT_TABLE(
|
||||
C_CHAR_3 CHAR(102400),
|
||||
C_VARCHAR_3 VARCHAR(1024),
|
||||
C_INT INTEGER,
|
||||
C_NUMERIC numeric(10,5),
|
||||
C_TS_WITHOUT TIMESTAMP WITHOUT TIME ZONE) with (orientation = column)
|
||||
DISTRIBUTE BY HASH(C_CHAR_3)
|
||||
partition by range (C_CHAR_3,C_VARCHAR_3,C_INT,C_TS_WITHOUT)
|
||||
(
|
||||
partition PARTITION_SELECT_PICT_1 values less than ('DEFGHIJ', 'defghij', 444, '2000-04-04 04:04:04'),
|
||||
partition PARTITION_SELECT_PICT_2 values less than ('GHIJKLM', 'ghijklm', 777, '2000-07-07 07:07:07'),
|
||||
partition PARTITION_SELECT_PICT_3 values less than ('MJKLMNO', 'ijklmno', 999, '2000-09-09 09:09:09')
|
||||
);
|
||||
insert into VECTOR_PARTITION_SELECT_PICT_TABLE select * from PARTITION_SELECT_PICT_TABLE;
|
||||
create index PARTITION_SELECT_PICT_INDEX_1 ON VECTOR_PARTITION_SELECT_PICT_TABLE using btree(C_CHAR_3,C_VARCHAR_3,C_INT,C_NUMERIC,C_TS_WITHOUT) local(PARTITION PARTITION_SELECT_PICT_1, PARTITION PARTITION_SELECT_PICT_2, PARTITION PARTITION_SELECT_PICT_3);
|
||||
create index PARTITION_SELECT_PICT_INDEX_2 ON VECTOR_PARTITION_SELECT_PICT_TABLE using btree(C_CHAR_3,C_VARCHAR_3,C_INT,C_TS_WITHOUT) local(PARTITION PARTITION_SELECT_PICT_1, PARTITION PARTITION_SELECT_PICT_2, PARTITION PARTITION_SELECT_PICT_3);
|
||||
create index PARTITION_SELECT_PICT_INDEX_3 ON VECTOR_PARTITION_SELECT_PICT_TABLE using btree(C_CHAR_3,C_INT,C_TS_WITHOUT) local(PARTITION PARTITION_SELECT_PICT_1, PARTITION PARTITION_SELECT_PICT_2, PARTITION PARTITION_SELECT_PICT_3);
|
||||
SELECT trim(C_CHAR_3) , trim(C_VARCHAR_3) , C_INT , C_NUMERIC , C_TS_WITHOUT , lower(trim(C_CHAR_3)) , initcap(trim(C_VARCHAR_3)) , abs(C_INT) , abs(C_NUMERIC) , extract(year from C_TS_WITHOUT) FROM VECTOR_PARTITION_SELECT_PICT_TABLE partition(PARTITION_SELECT_PICT_1) where 'a' not like C_VARCHAR_3 and 1000 != C_INT and C_NUMERIC is not null and (C_TS_WITHOUT >= '2000-01-01 01:01:01' and C_TS_WITHOUT <= '2000-09-09 09:09:09') ORDER BY 1 , 2 , 3 , 4 , 5 ;
|
||||
btrim | btrim | c_int | c_numeric | c_ts_without | lower | initcap | abs | abs | date_part
|
||||
---------+---------+-------+-----------+---------------------+---------+---------+-----+-----------+-----------
|
||||
A1 | a1 | 1 | 1.11100 | 2000-01-01 12:12:12 | a1 | A1 | 1 | 1.11100 | 2000
|
||||
A2 | a2 | 2 | 2.11100 | 2000-01-02 12:12:12 | a2 | A2 | 2 | 2.11100 | 2000
|
||||
A3 | a3 | 3 | 3.11100 | 2000-01-03 12:12:12 | a3 | A3 | 3 | 3.11100 | 2000
|
||||
A4 | a4 | 4 | 4.11100 | 2000-01-04 12:12:12 | a4 | A4 | 4 | 4.11100 | 2000
|
||||
A5 | a5 | 5 | 5.11100 | 2000-01-05 12:12:12 | a5 | A5 | 5 | 5.11100 | 2000
|
||||
ABCDEFG | abcdefg | 111 | 111.10000 | 2000-01-01 01:01:01 | abcdefg | Abcdefg | 111 | 111.10000 | 2000
|
||||
B101 | b101 | 101 | 101.11100 | 2000-02-01 12:12:12 | b101 | B101 | 101 | 101.11100 | 2000
|
||||
B102 | b102 | 102 | 102.11100 | 2000-02-02 12:12:12 | b102 | B102 | 102 | 102.11100 | 2000
|
||||
B103 | b103 | 103 | 103.11100 | 2000-02-03 12:12:12 | b103 | B103 | 103 | 103.11100 | 2000
|
||||
BCDEFGH | bcdefgh | 222 | 222.20000 | 2000-02-02 02:02:02 | bcdefgh | Bcdefgh | 222 | 222.20000 | 2000
|
||||
C201 | c201 | 201 | 201.11100 | 2000-03-01 12:12:12 | c201 | C201 | 201 | 201.11100 | 2000
|
||||
C202 | c202 | 202 | 202.11100 | 2000-03-02 12:12:12 | c202 | C202 | 202 | 202.11100 | 2000
|
||||
C203 | c203 | 203 | 203.11100 | 2000-03-03 12:12:12 | c203 | C203 | 203 | 203.11100 | 2000
|
||||
C204 | c204 | 204 | 204.11100 | 2000-03-04 12:12:12 | c204 | C204 | 204 | 204.11100 | 2000
|
||||
C205 | c205 | 205 | 205.11100 | 2000-03-05 12:12:12 | c205 | C205 | 205 | 205.11100 | 2000
|
||||
CDEFGHI | cdefghi | 333 | 333.30000 | 2000-03-03 03:03:03 | cdefghi | Cdefghi | 333 | 333.30000 | 2000
|
||||
D301 | d301 | 301 | 301.11100 | 2000-04-01 12:12:12 | d301 | D301 | 301 | 301.11100 | 2000
|
||||
D302 | d302 | 302 | 302.11100 | 2000-04-02 12:12:12 | d302 | D302 | 302 | 302.11100 | 2000
|
||||
D303 | d303 | 303 | 303.11100 | 2000-04-03 12:12:12 | d303 | D303 | 303 | 303.11100 | 2000
|
||||
DE401 | de401 | 401 | 401.11100 | 2000-05-01 12:12:12 | de401 | De401 | 401 | 401.11100 | 2000
|
||||
DE402 | de402 | 402 | 402.11100 | 2000-05-02 12:12:12 | de402 | De402 | 402 | 402.11100 | 2000
|
||||
DE403 | de403 | 403 | 403.11100 | 2000-05-03 12:12:12 | de403 | De403 | 403 | 403.11100 | 2000
|
||||
DE404 | de404 | 404 | 404.11100 | 2000-05-04 12:12:12 | de404 | De404 | 404 | 404.11100 | 2000
|
||||
DE405 | de405 | 405 | 405.11100 | 2000-05-05 12:12:12 | de405 | De405 | 405 | 405.11100 | 2000
|
||||
(24 rows)
|
||||
|
||||
drop table PARTITION_SELECT_PICT_TABLE;
|
||||
drop table VECTOR_PARTITION_SELECT_PICT_TABLE;
|
||||
|
||||
@ -1,62 +1,155 @@
|
||||
create schema cstore_btree_index2;
|
||||
set current_schema = cstore_btree_index2;
|
||||
----
|
||||
--case 3: check reserve column
|
||||
--- case 10:index scan with qual push down
|
||||
----
|
||||
CREATE TABLE check_column(id int, tid int);
|
||||
ERROR: column name "tid" conflicts with a system column name
|
||||
CREATE TABLE check_column(id int);
|
||||
ALTER TABLE check_column ADD COLUMN tid int;
|
||||
ERROR: column name "tid" conflicts with a system column name
|
||||
CREATE TABLE row_tbl_for_gin_idx(c_id tsvector ,c_d_id tsvector) DISTRIBUTE BY REPLICATION;
|
||||
set datestyle to iso;
|
||||
SET IntervalStyle to postgres;
|
||||
set time zone PRC;
|
||||
CREATE TABLE PARTITION_SELECT_PICT_TABLE(
|
||||
C_CHAR_3 CHAR(102400),
|
||||
C_VARCHAR_3 VARCHAR(1024),
|
||||
C_INT INTEGER,
|
||||
C_NUMERIC numeric(10,5),
|
||||
C_TS_WITHOUT TIMESTAMP WITHOUT TIME ZONE)
|
||||
partition by range (C_CHAR_3,C_VARCHAR_3,C_INT,C_TS_WITHOUT)
|
||||
(
|
||||
partition PARTITION_SELECT_PICT_1 values less than ('DEFGHIJ', 'defghij', 444, '2000-04-04 04:04:04'),
|
||||
partition PARTITION_SELECT_PICT_2 values less than ('GHIJKLM', 'ghijklm', 777, '2000-07-07 07:07:07'),
|
||||
partition PARTITION_SELECT_PICT_3 values less than ('MJKLMNO', 'ijklmno', 999, '2000-09-09 09:09:09')
|
||||
);
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('ABCDEFG','abcdefg',111,111.1,'2000-01-01 01:01:01');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('BCDEFGH','bcdefgh',222,222.2,'2000-02-02 02:02:02');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('CDEFGHI','cdefghi',333,333.3,'2000-03-03 03:03:03');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('DEFGHIJ','defghij',444,444.4,'2000-04-04 04:04:04');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('EFGHIJK','efghijk',555,555.5,'2000-05-05 05:05:05');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('FGHIJKL','fghijkl',666,666.6,'2000-06-06 06:06:06');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('ABCDEFG',null,111,111.1,'2000-01-01 01:01:01');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('ABCDEFG',null,null,null,null);
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('ABCDEFG','abcdefg',null,111.1,'2000-01-01 01:01:01');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('BCDEFGH','bcdefgh',null,null,'2000-02-02 02:02:02');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('BCDEFGH',null,222,null,'2000-02-02 02:02:02');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('CDEFGHI','cdefghi',333,null,'2000-03-03 03:03:03');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('EFGHIJK',null,null,555.5,'2000-05-05 05:05:05');
|
||||
INSERT INTO PARTITION_SELECT_PICT_TABLE VALUES('FGHIJKL','fghijkl',null,null,null);
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('A'||generate_series(1,5),'a'||generate_series(1,5),generate_series(1,5),cast( generate_series(1,5)||'.111' as numeric(10,5)),cast('2000-01-'||generate_series(1,5)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('B'||generate_series(101,103),'b'||generate_series(101,103),generate_series(101,103),cast(generate_series(101,103)||'.111' as numeric(10,5)),cast('2000-02-'||generate_series(1,3)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('C'||generate_series(201,205),'c'||generate_series(201,205),generate_series(201,205),cast(generate_series(201,205)||'.111' as numeric(10,5)),cast('2000-03-'||generate_series(1,5)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('D'||generate_series(301,303),'d'||generate_series(301,303),generate_series(301,303),cast(generate_series(301,303)||'.111' as numeric(10,5)),cast('2000-04-'||generate_series(1,3)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('DE'||generate_series(401,405),'de'||generate_series(401,405),generate_series(401,405),cast(generate_series(401,405)||'.111' as numeric(10,5)),cast('2000-05-'||generate_series(1,5)||' 12:12:12' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('E'||generate_series(501,504),'e'||generate_series(501,504),generate_series(501,504),cast( generate_series(501,504)||'.222' as numeric(10,5)),cast('2000-01-'||generate_series(1,4)||' 13:13:13' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('F'||generate_series(601,603),'f'||generate_series(601,603),generate_series(601,603),cast(generate_series(601,603)||'.222' as numeric(10,5)),cast('2000-02-'||generate_series(1,3)||' 13:13:13' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('G'||generate_series(701,705),'g'||generate_series(701,705),generate_series(701,705),cast(generate_series(701,705)||'.222' as numeric(10,5)),cast('2000-03-'||generate_series(1,5)||' 13:13:13' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
insert into PARTITION_SELECT_PICT_TABLE VALUES('GH'||generate_series(801,803),'gh'||generate_series(801,803),generate_series(801,803),cast(generate_series(801,803)||'.222' as numeric(10,5)),cast('2000-04-'||generate_series(1,3)||' 13:13:13' as TIMESTAMP WITHOUT TIME ZONE));
|
||||
CREATE TABLE VECTOR_PARTITION_SELECT_PICT_TABLE(
|
||||
C_CHAR_3 CHAR(102400),
|
||||
C_VARCHAR_3 VARCHAR(1024),
|
||||
C_INT INTEGER,
|
||||
C_NUMERIC numeric(10,5),
|
||||
C_TS_WITHOUT TIMESTAMP WITHOUT TIME ZONE) with (orientation = column)
|
||||
|
||||
partition by range (C_CHAR_3,C_VARCHAR_3,C_INT,C_TS_WITHOUT)
|
||||
(
|
||||
partition PARTITION_SELECT_PICT_1 values less than ('DEFGHIJ', 'defghij', 444, '2000-04-04 04:04:04'),
|
||||
partition PARTITION_SELECT_PICT_2 values less than ('GHIJKLM', 'ghijklm', 777, '2000-07-07 07:07:07'),
|
||||
partition PARTITION_SELECT_PICT_3 values less than ('MJKLMNO', 'ijklmno', 999, '2000-09-09 09:09:09')
|
||||
);
|
||||
insert into VECTOR_PARTITION_SELECT_PICT_TABLE select * from PARTITION_SELECT_PICT_TABLE;
|
||||
create index PARTITION_SELECT_PICT_INDEX_1 ON VECTOR_PARTITION_SELECT_PICT_TABLE(C_CHAR_3,C_VARCHAR_3,C_INT,C_NUMERIC,C_TS_WITHOUT) local(PARTITION PARTITION_SELECT_PICT_1, PARTITION PARTITION_SELECT_PICT_2, PARTITION PARTITION_SELECT_PICT_3);
|
||||
create index PARTITION_SELECT_PICT_INDEX_2 ON VECTOR_PARTITION_SELECT_PICT_TABLE(C_CHAR_3,C_VARCHAR_3,C_INT,C_TS_WITHOUT) local(PARTITION PARTITION_SELECT_PICT_1, PARTITION PARTITION_SELECT_PICT_2, PARTITION PARTITION_SELECT_PICT_3);
|
||||
create index PARTITION_SELECT_PICT_INDEX_3 ON VECTOR_PARTITION_SELECT_PICT_TABLE(C_CHAR_3,C_INT,C_TS_WITHOUT) local(PARTITION PARTITION_SELECT_PICT_1, PARTITION PARTITION_SELECT_PICT_2, PARTITION PARTITION_SELECT_PICT_3);
|
||||
SELECT trim(C_CHAR_3) , trim(C_VARCHAR_3) , C_INT , C_NUMERIC , C_TS_WITHOUT , lower(trim(C_CHAR_3)) , initcap(trim(C_VARCHAR_3)) , abs(C_INT) , abs(C_NUMERIC) , extract(year from C_TS_WITHOUT) FROM VECTOR_PARTITION_SELECT_PICT_TABLE partition(PARTITION_SELECT_PICT_1) where 'a' not like C_VARCHAR_3 and 1000 != C_INT and C_NUMERIC is not null and (C_TS_WITHOUT >= '2000-01-01 01:01:01' and C_TS_WITHOUT <= '2000-09-09 09:09:09') ORDER BY 1 , 2 , 3 , 4 , 5 ;
|
||||
btrim | btrim | c_int | c_numeric | c_ts_without | lower | initcap | abs | abs | date_part
|
||||
---------+---------+-------+-----------+---------------------+---------+---------+-----+-----------+-----------
|
||||
A1 | a1 | 1 | 1.11100 | 2000-01-01 12:12:12 | a1 | A1 | 1 | 1.11100 | 2000
|
||||
A2 | a2 | 2 | 2.11100 | 2000-01-02 12:12:12 | a2 | A2 | 2 | 2.11100 | 2000
|
||||
A3 | a3 | 3 | 3.11100 | 2000-01-03 12:12:12 | a3 | A3 | 3 | 3.11100 | 2000
|
||||
A4 | a4 | 4 | 4.11100 | 2000-01-04 12:12:12 | a4 | A4 | 4 | 4.11100 | 2000
|
||||
A5 | a5 | 5 | 5.11100 | 2000-01-05 12:12:12 | a5 | A5 | 5 | 5.11100 | 2000
|
||||
ABCDEFG | abcdefg | 111 | 111.10000 | 2000-01-01 01:01:01 | abcdefg | Abcdefg | 111 | 111.10000 | 2000
|
||||
B101 | b101 | 101 | 101.11100 | 2000-02-01 12:12:12 | b101 | B101 | 101 | 101.11100 | 2000
|
||||
B102 | b102 | 102 | 102.11100 | 2000-02-02 12:12:12 | b102 | B102 | 102 | 102.11100 | 2000
|
||||
B103 | b103 | 103 | 103.11100 | 2000-02-03 12:12:12 | b103 | B103 | 103 | 103.11100 | 2000
|
||||
BCDEFGH | bcdefgh | 222 | 222.20000 | 2000-02-02 02:02:02 | bcdefgh | Bcdefgh | 222 | 222.20000 | 2000
|
||||
C201 | c201 | 201 | 201.11100 | 2000-03-01 12:12:12 | c201 | C201 | 201 | 201.11100 | 2000
|
||||
C202 | c202 | 202 | 202.11100 | 2000-03-02 12:12:12 | c202 | C202 | 202 | 202.11100 | 2000
|
||||
C203 | c203 | 203 | 203.11100 | 2000-03-03 12:12:12 | c203 | C203 | 203 | 203.11100 | 2000
|
||||
C204 | c204 | 204 | 204.11100 | 2000-03-04 12:12:12 | c204 | C204 | 204 | 204.11100 | 2000
|
||||
C205 | c205 | 205 | 205.11100 | 2000-03-05 12:12:12 | c205 | C205 | 205 | 205.11100 | 2000
|
||||
CDEFGHI | cdefghi | 333 | 333.30000 | 2000-03-03 03:03:03 | cdefghi | Cdefghi | 333 | 333.30000 | 2000
|
||||
D301 | d301 | 301 | 301.11100 | 2000-04-01 12:12:12 | d301 | D301 | 301 | 301.11100 | 2000
|
||||
D302 | d302 | 302 | 302.11100 | 2000-04-02 12:12:12 | d302 | D302 | 302 | 302.11100 | 2000
|
||||
D303 | d303 | 303 | 303.11100 | 2000-04-03 12:12:12 | d303 | D303 | 303 | 303.11100 | 2000
|
||||
DE401 | de401 | 401 | 401.11100 | 2000-05-01 12:12:12 | de401 | De401 | 401 | 401.11100 | 2000
|
||||
DE402 | de402 | 402 | 402.11100 | 2000-05-02 12:12:12 | de402 | De402 | 402 | 402.11100 | 2000
|
||||
DE403 | de403 | 403 | 403.11100 | 2000-05-03 12:12:12 | de403 | De403 | 403 | 403.11100 | 2000
|
||||
DE404 | de404 | 404 | 404.11100 | 2000-05-04 12:12:12 | de404 | De404 | 404 | 404.11100 | 2000
|
||||
DE405 | de405 | 405 | 405.11100 | 2000-05-05 12:12:12 | de405 | De405 | 405 | 405.11100 | 2000
|
||||
(24 rows)
|
||||
|
||||
drop table PARTITION_SELECT_PICT_TABLE;
|
||||
drop table VECTOR_PARTITION_SELECT_PICT_TABLE;
|
||||
CREATE TABLE row_tbl_for_gin_idx(c_id tsvector ,c_d_id tsvector) ;
|
||||
CREATE INDEX ginidx_for_rowtbl ON row_tbl_for_gin_idx USING GIN(c_id,c_d_id) WITH (FASTUPDATE = OFF);
|
||||
-- test storage parameters for index normal-relation
|
||||
CREATE TABLE heaptbl_idxstorage ( a int, b int , c int ) with ( orientation = column );
|
||||
CREATE INDEX idx00_heaptbl_idxstorage ON heaptbl_idxstorage using btree(b) with (max_batchrow = 20000, partial_cluster_rows = 720000, deltarow_threshold = 2000 );
|
||||
CREATE INDEX idx00_heaptbl_idxstorage ON heaptbl_idxstorage(b) with (max_batchrow = 20000, partial_cluster_rows = 720000, deltarow_threshold = 2000 );
|
||||
SELECT relam, relkind, reloptions FROM pg_class WHERE relname = 'idx00_heaptbl_idxstorage';
|
||||
relam | relkind | reloptions
|
||||
-------+---------+--------------------------------------------------------------------------
|
||||
4039 | i | {max_batchrow=40000,partial_cluster_rows=920000,deltarow_threshold=4000}
|
||||
4239 | i | {max_batchrow=20000,partial_cluster_rows=720000,deltarow_threshold=2000}
|
||||
(2 rows)
|
||||
4039 | i | {max_batchrow=20000,partial_cluster_rows=720000,deltarow_threshold=2000}
|
||||
(1 row)
|
||||
|
||||
SELECT reloptions FROM pg_class WHERE oid = (SELECT relcudescrelid FROM pg_class WHERE relname = 'idx00_heaptbl_idxstorage');
|
||||
ERROR: more than one row returned by a subquery used as an expression
|
||||
reloptions
|
||||
-----------------------------------------------------------------------------------------------------------------
|
||||
{max_batchrow=20000,partial_cluster_rows=720000,deltarow_threshold=2000,orientation=column,internal_mask=33031}
|
||||
(1 row)
|
||||
|
||||
ALTER INDEX idx00_heaptbl_idxstorage SET (max_batchrow = 40000, partial_cluster_rows = 920000, deltarow_threshold = 4000 );
|
||||
SELECT relam, relkind, reloptions FROM pg_class WHERE relname = 'idx00_heaptbl_idxstorage';
|
||||
relam | relkind | reloptions
|
||||
-------+---------+--------------------------------------------------------------------------
|
||||
4039 | i | {max_batchrow=40000,partial_cluster_rows=920000,deltarow_threshold=4000}
|
||||
4239 | i | {max_batchrow=40000,partial_cluster_rows=920000,deltarow_threshold=4000}
|
||||
(2 rows)
|
||||
(1 row)
|
||||
|
||||
SELECT reloptions FROM pg_class WHERE oid = (SELECT relcudescrelid FROM pg_class WHERE relname = 'idx00_heaptbl_idxstorage');
|
||||
ERROR: more than one row returned by a subquery used as an expression
|
||||
reloptions
|
||||
-----------------------------------------------------------------------------------------------------------------
|
||||
{orientation=column,internal_mask=33031,max_batchrow=40000,partial_cluster_rows=920000,deltarow_threshold=4000}
|
||||
(1 row)
|
||||
|
||||
-- test storage parameters for index partition-relation
|
||||
CREATE TABLE parttbl_idxstorage ( a int, b int , c int ) with ( orientation = column )
|
||||
partition by range(b) (partition p1 values less than (10), partition p2 values less than (100));
|
||||
CREATE INDEX idx00_parttbl_idxstorage ON parttbl_idxstorage using btree(c) local with (max_batchrow = 20000, partial_cluster_rows = 720000, deltarow_threshold = 2000 );
|
||||
CREATE INDEX idx00_parttbl_idxstorage ON parttbl_idxstorage(c) local with (max_batchrow = 20000, partial_cluster_rows = 720000, deltarow_threshold = 2000 );
|
||||
SELECT relam, relkind, reloptions FROM pg_class WHERE relname = 'idx00_parttbl_idxstorage';
|
||||
relam | relkind | reloptions
|
||||
-------+---------+--------------------------------------------------------------------------
|
||||
4039 | i | {max_batchrow=40000,partial_cluster_rows=920000,deltarow_threshold=4000}
|
||||
4239 | i | {max_batchrow=20000,partial_cluster_rows=720000,deltarow_threshold=2000}
|
||||
(2 rows)
|
||||
4039 | i | {max_batchrow=20000,partial_cluster_rows=720000,deltarow_threshold=2000}
|
||||
(1 row)
|
||||
|
||||
SELECT reloptions FROM pg_class WHERE oid in (
|
||||
SELECT relcudescrelid from pg_partition where parentid = (SELECT oid FROM pg_class WHERE relname = 'idx00_parttbl_idxstorage') );
|
||||
ERROR: more than one row returned by a subquery used as an expression
|
||||
reloptions
|
||||
-----------------------------------------------------------------------------------------------------------------
|
||||
{max_batchrow=20000,partial_cluster_rows=720000,deltarow_threshold=2000,orientation=column,internal_mask=33031}
|
||||
{max_batchrow=20000,partial_cluster_rows=720000,deltarow_threshold=2000,orientation=column,internal_mask=33031}
|
||||
(2 rows)
|
||||
|
||||
ALTER INDEX idx00_parttbl_idxstorage SET (max_batchrow = 40000, partial_cluster_rows = 920000, deltarow_threshold = 4000 );
|
||||
SELECT relam, relkind, reloptions FROM pg_class WHERE relname = 'idx00_parttbl_idxstorage';
|
||||
relam | relkind | reloptions
|
||||
-------+---------+--------------------------------------------------------------------------
|
||||
4039 | i | {max_batchrow=40000,partial_cluster_rows=920000,deltarow_threshold=4000}
|
||||
4239 | i | {max_batchrow=40000,partial_cluster_rows=920000,deltarow_threshold=4000}
|
||||
(2 rows)
|
||||
(1 row)
|
||||
|
||||
SELECT reloptions FROM pg_class WHERE oid in (
|
||||
SELECT relcudescrelid from pg_partition where parentid = (SELECT oid FROM pg_class WHERE relname = 'idx00_parttbl_idxstorage') );
|
||||
ERROR: more than one row returned by a subquery used as an expression
|
||||
reloptions
|
||||
-----------------------------------------------------------------------------------------------------------------
|
||||
{orientation=column,internal_mask=33031,max_batchrow=40000,partial_cluster_rows=920000,deltarow_threshold=4000}
|
||||
{orientation=column,internal_mask=33031,max_batchrow=40000,partial_cluster_rows=920000,deltarow_threshold=4000}
|
||||
(2 rows)
|
||||
|
||||
-- test: fill vector batch by switching to different CUs
|
||||
CREATE TABLE coltbl ( a int, b int ) WITH ( ORIENTATION = COLUMN );
|
||||
CREATE TABLE rowtbl ( a int, b int );
|
||||
@ -68,8 +161,8 @@ INSERT INTO coltbl SELECT * FROM rowtbl;
|
||||
TRUNCATE TABLE rowtbl;
|
||||
INSERT INTO rowtbl VALUES ( 1, 5) , (1, 6);
|
||||
INSERT INTO coltbl SELECT * FROM rowtbl;
|
||||
CREATE INDEX idx_coltbl ON coltbl using btree(b);
|
||||
SELECT * FROM coltbl WHERE b < 6 order by 1, 2;
|
||||
CREATE INDEX idx_coltbl ON coltbl(b);
|
||||
SELECT * FROM coltbl WHERE b < 6 order by b;
|
||||
a | b
|
||||
---+---
|
||||
1 | 1
|
||||
@ -83,8 +176,8 @@ DROP TABLE coltbl;
|
||||
DROP TABLE rowtbl;
|
||||
-- index scan: constant target list
|
||||
create table test_index_const_targetlist (id int,info int,info1 int) with(orientation=column);
|
||||
create index idx1_test_index_const_targetlist on test_index_const_targetlist using btree(info);
|
||||
create index idx2_test_index_const_targetlist on test_index_const_targetlist using btree(info1);
|
||||
create index idx1_test_index_const_targetlist on test_index_const_targetlist(info);
|
||||
create index idx2_test_index_const_targetlist on test_index_const_targetlist(info1);
|
||||
insert into test_index_const_targetlist values(generate_series(1,10),generate_series(1,10), 1);
|
||||
update test_index_const_targetlist set info=info+1 where info>5;
|
||||
select 1 from test_index_const_targetlist where info1=1 ;
|
||||
@ -125,7 +218,7 @@ create table psort_schema.psort_base_tab (
|
||||
col_timetz time with time zone,
|
||||
col_interval interval,
|
||||
col_smalldatetine smalldatetime,partial cluster key(col_timestamp)
|
||||
) with (orientation=column) distribute by hash(col_int)
|
||||
) with (orientation=column)
|
||||
partition by range (col_int)
|
||||
(
|
||||
partition vector_base_tab_000_1 values less than (10),
|
||||
@ -188,7 +281,7 @@ create table psort_base_tab (
|
||||
col_timetz time with time zone,
|
||||
col_interval interval,
|
||||
col_smalldatetine smalldatetime,partial cluster key(col_timestamp)
|
||||
) with (orientation=column) distribute by hash(col_int)
|
||||
) with (orientation=column)
|
||||
partition by range (col_int)
|
||||
(
|
||||
partition vector_base_tab_000_1 values less than (10),
|
||||
@ -231,14 +324,14 @@ partition vector_base_tab_000_37 values less than (3887),
|
||||
partition vector_base_tab_000_38 values less than (3987),
|
||||
partition vector_base_tab_000_39 values less than (maxvalue)
|
||||
);
|
||||
create index psort_base_tab_index_0001 on psort_schema.psort_base_tab using btree(col_smallint,col_int,col_char,col_text,col_timestamp,col_date) local;
|
||||
create index psort_base_tab_index_0001 on psort_base_tab using btree(col_smallint,col_int,col_char,col_text,col_timestamp,col_date) local;
|
||||
create index psort_base_tab_index_0001 on psort_schema.psort_base_tab(col_smallint,col_int,col_char,col_text,col_timestamp,col_date) local;
|
||||
create index psort_base_tab_index_0001 on psort_base_tab(col_smallint,col_int,col_char,col_text,col_timestamp,col_date) local;
|
||||
drop table psort_schema.psort_base_tab;
|
||||
drop table psort_base_tab;
|
||||
----
|
||||
-- create index in tablespace
|
||||
----
|
||||
create table psort_schema.cstore_col_part (id int, cu int, num int, num1 int) with (orientation = column) distribute by hash(id)
|
||||
create table psort_schema.cstore_col_part (id int, cu int, num int, num1 int) with (orientation = column)
|
||||
partition by range (num1)
|
||||
(
|
||||
partition p1 values less than (1000),
|
||||
@ -248,22 +341,19 @@ partition by range (num1)
|
||||
partition p5 values less than (5000),
|
||||
partition p6 values less than (maxvalue)
|
||||
);
|
||||
create table psort_schema.cstore_row (id int, cu int, num int, num1 int) distribute by hash(id);
|
||||
create table psort_schema.cstore_row (id int, cu int, num int, num1 int) ;
|
||||
insert into psort_schema.cstore_row values(1, 1, generate_series(1, 5000), generate_series(1, 5000));
|
||||
insert into psort_schema.cstore_col_part select * from psort_schema.cstore_row;
|
||||
create tablespace psort_ts location '@testtablespace@/psort_ts' maxsize '256k';
|
||||
create index on psort_schema.cstore_col_part using btree(num) local tablespace psort_ts;
|
||||
drop tablespace psort_ts;
|
||||
ERROR: tablespace "psort_ts" is not empty
|
||||
create tablespace psort_ts location '@testtablespace@/psort_ts';
|
||||
ERROR: tablespace "psort_ts" already exists
|
||||
start transaction;
|
||||
create index on psort_schema.cstore_col_part using btree(num) local tablespace psort_ts;
|
||||
create tablespace psort_ts location '/usr3/data1/jiangyan/openGauss-server/src/test/regress/testtablespace/psort_ts' maxsize '256k';
|
||||
create index on psort_schema.cstore_col_part(num) local tablespace psort_ts;
|
||||
ERROR: Insufficient storage space for tablespace "psort_ts"
|
||||
HINT: Limited size is 262144, current size is 253952, request size is 16384
|
||||
HINT: Limited size is 262144, current size is 270336, request size is 8192
|
||||
drop tablespace psort_ts;
|
||||
create tablespace psort_ts location '/usr3/data1/jiangyan/openGauss-server/src/test/regress/testtablespace/psort_ts';
|
||||
start transaction;
|
||||
create index on psort_schema.cstore_col_part(num) local tablespace psort_ts;
|
||||
rollback;
|
||||
drop tablespace psort_ts;
|
||||
ERROR: tablespace "psort_ts" is not empty
|
||||
drop table psort_schema.cstore_col_part;
|
||||
----
|
||||
-- CStoreIndexScan and output XMIN
|
||||
@ -272,14 +362,14 @@ insert into psort_schema.cstore_row values(1, 2, generate_series(1, 5000), gener
|
||||
insert into psort_schema.cstore_row values(1, 3, generate_series(1, 5000), generate_series(1, 5000));
|
||||
insert into psort_schema.cstore_row values(1, 4, generate_series(1, 5000), generate_series(1, 5000));
|
||||
insert into psort_schema.cstore_row values(1, 5, generate_series(1, 5000), generate_series(1, 5000));
|
||||
create table psort_schema.cstore_col (id int, cu int, num int, num1 int) with (orientation = column) distribute by hash(id);
|
||||
create table psort_schema.cstore_col (id int, cu int, num int, num1 int) with (orientation = column) ;
|
||||
insert into psort_schema.cstore_col select * from psort_schema.cstore_row where cu = 1;
|
||||
insert into psort_schema.cstore_col select * from psort_schema.cstore_row where cu = 2;
|
||||
insert into psort_schema.cstore_col select * from psort_schema.cstore_row where cu = 3;
|
||||
insert into psort_schema.cstore_col select * from psort_schema.cstore_row where cu = 4;
|
||||
insert into psort_schema.cstore_col select * from psort_schema.cstore_row where cu = 5;
|
||||
create index on psort_schema.cstore_col using btree(num);
|
||||
create index on psort_schema.cstore_col using btree(num1);
|
||||
create index on psort_schema.cstore_col(num);
|
||||
create index on psort_schema.cstore_col(num1);
|
||||
analyze psort_schema.cstore_col;
|
||||
select count(xmin) from psort_schema.cstore_col where num = 100;
|
||||
count
|
||||
@ -296,9 +386,3 @@ select count(xmin) from psort_schema.cstore_col where num = 200 and num1 = 200;
|
||||
drop table psort_schema.cstore_row;
|
||||
drop table psort_schema.cstore_col;
|
||||
DROP SCHEMA psort_schema CASCADE;
|
||||
drop schema cstore_btree_index2 cascade;
|
||||
NOTICE: drop cascades to 4 other objects
|
||||
DETAIL: drop cascades to table check_column
|
||||
drop cascades to table row_tbl_for_gin_idx
|
||||
drop cascades to table heaptbl_idxstorage
|
||||
drop cascades to table parttbl_idxstorage
|
||||
|
||||
@ -41,42 +41,49 @@ alter user noindependent_user identified by 'gauss@789';
|
||||
ERROR: Only independent user himself can alter his own password.
|
||||
grant independent_user to noindependent_user;
|
||||
ERROR: Only independent user himself can decide his own membership.
|
||||
\! @abs_bindir@/gsql -d regression -U noindependent_user -W 'gauss@123' -p @portstring@ -c 'alter user noindependent_user with noindependent;'
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gsql -d regression -U noindependent_user -W 'gauss@123' -p 25632 -c 'alter user noindependent_user with noindependent;'
|
||||
ALTER ROLE
|
||||
\! @abs_bindir@/gsql -d regression -U independent_user -W 'gauss@123' -p @portstring@ -c 'create table independent_tbl(id1 int,id2 int);insert into independent_tbl values(100,100);insert into independent_tbl values(300,300);'
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gsql -d regression -U independent_user -W 'gauss@123' -p 25632 -c 'create table independent_tbl(id1 int,id2 int);insert into independent_tbl values(100,100);insert into independent_tbl values(300,300);'
|
||||
CREATE TABLE
|
||||
INSERT 0 1
|
||||
INSERT 0 1
|
||||
\! @abs_bindir@/gsql -d regression -U independent_user -W 'gauss@123' -p @portstring@ -c 'create view independent_user.myview as select * from independent_user.independent_tbl;'
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gsql -d regression -U independent_user -W 'gauss@123' -p 25632 -c 'create view independent_user.myview as select * from independent_user.independent_tbl;'
|
||||
CREATE VIEW
|
||||
\! @abs_bindir@/gsql -d regression -U noindependent_user -W 'gauss@123' -p @portstring@ -c 'create table noindependent_tbl(id1 int,id2 int);insert into noindependent_tbl values(100,100);insert into noindependent_tbl values(300,300);'
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gsql -d regression -U noindependent_user -W 'gauss@123' -p 25632 -c 'create table noindependent_tbl(id1 int,id2 int);insert into noindependent_tbl values(100,100);insert into noindependent_tbl values(300,300);'
|
||||
CREATE TABLE
|
||||
INSERT 0 1
|
||||
INSERT 0 1
|
||||
\! @abs_bindir@/gsql -d regression -U noindependent_user -W 'gauss@123' -p @portstring@ -c 'create view noindependent_user.myview as select * from noindependent_user.noindependent_tbl;'
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gsql -d regression -U noindependent_user -W 'gauss@123' -p 25632 -c 'create view noindependent_user.myview as select * from noindependent_user.noindependent_tbl;'
|
||||
CREATE VIEW
|
||||
--independent
|
||||
insert into independent_user.independent_tbl values(100,100);
|
||||
ERROR: permission denied for relation independent_tbl
|
||||
DETAIL: N/A
|
||||
delete from independent_user.independent_tbl where id1=100;
|
||||
ERROR: permission denied for relation independent_tbl
|
||||
DETAIL: N/A
|
||||
update independent_user.independent_tbl set id2=500 where id1=300;
|
||||
ERROR: permission denied for relation independent_tbl
|
||||
DETAIL: N/A
|
||||
select * from independent_user.independent_tbl;
|
||||
ERROR: permission denied for relation independent_tbl
|
||||
DETAIL: N/A
|
||||
grant select on independent_user.independent_tbl to sysuser;
|
||||
ERROR: permission denied for relation independent_tbl
|
||||
ERROR: no privileges were granted for "independent_tbl"
|
||||
revoke select on independent_user.independent_tbl from sysuser;
|
||||
ERROR: permission denied for relation independent_tbl
|
||||
ERROR: no privileges could be revoked for "independent_tbl"
|
||||
copy independent_user.independent_tbl to STDOUT;
|
||||
ERROR: permission denied for relation independent_tbl
|
||||
DETAIL: N/A
|
||||
alter table independent_user.independent_tbl owner to sysuser;
|
||||
ERROR: must be owner of relation independent_tbl
|
||||
DETAIL: N/A
|
||||
truncate independent_user.independent_tbl;
|
||||
vacuum independent_user.independent_tbl;
|
||||
analyze independent_user.independent_tbl;
|
||||
select * from independent_user.myview;
|
||||
ERROR: permission denied for relation myview
|
||||
DETAIL: N/A
|
||||
select has_table_privilege('independent_user.independent_tbl','select');
|
||||
has_table_privilege
|
||||
---------------------
|
||||
@ -137,6 +144,7 @@ alter table noindependent_user.noindependent_tbl owner to sysuser;
|
||||
truncate noindependent_user.noindependent_tbl;
|
||||
select * from noindependent_user.myview;
|
||||
ERROR: permission denied for relation noindependent_tbl
|
||||
DETAIL: N/A
|
||||
select has_table_privilege('noindependent_user.noindependent_tbl','select');
|
||||
has_table_privilege
|
||||
---------------------
|
||||
@ -183,18 +191,22 @@ select has_table_privilege('noindependent_user.noindependent_tbl','trigger');
|
||||
create table independent_user.like_independent_tbl(like independent_user.independent_tbl);
|
||||
create table independent_user.temp_create_tbl as select * from independent_user.independent_tbl;
|
||||
ERROR: permission denied for relation temp_create_tbl
|
||||
DETAIL: N/A
|
||||
select * into independent_user.temp_create_tbl from independent_user.independent_tbl;
|
||||
ERROR: permission denied for relation temp_create_tbl
|
||||
DETAIL: N/A
|
||||
create table public.temp_create_tbl as select * from independent_user.independent_tbl;
|
||||
ERROR: permission denied for relation independent_tbl
|
||||
DETAIL: N/A
|
||||
select * into public.temp_create_tbl from independent_user.independent_tbl;
|
||||
ERROR: permission denied for relation independent_tbl
|
||||
DETAIL: N/A
|
||||
create index indep_idx on independent_user.independent_tbl(id2);
|
||||
drop index independent_user.indep_idx;
|
||||
--test disable password for independent
|
||||
\! @abs_bindir@/gsql -d regression -U independent_user -W 'gauss@123' -p @portstring@ -c 'alter user independent_user password disable;'
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gsql -d regression -U independent_user -W 'gauss@123' -p 25632 -c 'alter user independent_user password disable;'
|
||||
ALTER ROLE
|
||||
\! @abs_bindir@/gsql -d regression -U noindependent_user -W 'gauss@123' -p @portstring@ -c 'alter user noindependent_user password disable;'
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gsql -d regression -U noindependent_user -W 'gauss@123' -p 25632 -c 'alter user noindependent_user password disable;'
|
||||
ERROR: Only system admin can disable user's password.
|
||||
alter user independent_user password disable;
|
||||
ERROR: Only independent user himself can disable his own password.
|
||||
|
||||
@ -71,7 +71,6 @@ create index idx1_test_merge_index on test_merge_index_test(c1) local;
|
||||
create index idx2_test_merge_index on test_merge_index_test(c1, c2) local;
|
||||
create index idx3_test_merge_index on test_merge_index_test(c1, c2, c3) local;
|
||||
create index idx4_test_merge_index on test_merge_index_test using hash (c1) local;
|
||||
ERROR: access method "hash" does not support row store
|
||||
--4.1 merge 2 partitions into one
|
||||
alter table test_merge_index_test merge partitions
|
||||
test_merge_index_test_p1, test_merge_index_test_p2
|
||||
@ -81,18 +80,16 @@ SET enable_seqscan = ON;
|
||||
SET enable_indexscan = OFF;
|
||||
SET enable_indexonlyscan = OFF;
|
||||
SET enable_bitmapscan = OFF;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1
|
||||
-> Sort
|
||||
Sort Key: c1
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1;
|
||||
c1 | c2 | c3
|
||||
@ -398,18 +395,16 @@ select * from test_merge_index_test order by c1;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2
|
||||
-> Sort
|
||||
Sort Key: c1, c2
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1, c2
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
c1 | c2 | c3
|
||||
@ -715,18 +710,16 @@ select * from test_merge_index_test order by c1, c2;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2, c3
|
||||
-> Sort
|
||||
Sort Key: c1, c2, c3
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1, c2, c3
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
c1 | c2 | c3
|
||||
@ -1037,18 +1030,16 @@ SET enable_seqscan = OFF;
|
||||
SET enable_indexscan = ON;
|
||||
SET enable_indexonlyscan = OFF;
|
||||
SET enable_bitmapscan = OFF;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1
|
||||
-> Sort
|
||||
Sort Key: c1
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Index Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Index Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1;
|
||||
c1 | c2 | c3
|
||||
@ -1354,18 +1345,16 @@ select * from test_merge_index_test order by c1;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2
|
||||
-> Sort
|
||||
Sort Key: c1, c2
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Index Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1, c2
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Index Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
c1 | c2 | c3
|
||||
@ -1671,18 +1660,16 @@ select * from test_merge_index_test order by c1, c2;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2, c3
|
||||
-> Sort
|
||||
Sort Key: c1, c2, c3
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Index Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1, c2, c3
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Index Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
c1 | c2 | c3
|
||||
@ -1993,18 +1980,16 @@ SET enable_seqscan = OFF;
|
||||
SET enable_indexscan = OFF;
|
||||
SET enable_indexonlyscan = ON;
|
||||
SET enable_bitmapscan = OFF;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1
|
||||
-> Sort
|
||||
Sort Key: c1
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1;
|
||||
c1 | c2 | c3
|
||||
@ -2310,18 +2295,16 @@ select * from test_merge_index_test order by c1;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2
|
||||
-> Sort
|
||||
Sort Key: c1, c2
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1, c2
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
c1 | c2 | c3
|
||||
@ -2627,18 +2610,16 @@ select * from test_merge_index_test order by c1, c2;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2, c3
|
||||
-> Sort
|
||||
Sort Key: c1, c2, c3
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1, c2, c3
|
||||
-> Partition Iterator
|
||||
Iterations: 29
|
||||
-> Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..29
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
c1 | c2 | c3
|
||||
@ -2953,18 +2934,16 @@ SET enable_seqscan = ON;
|
||||
SET enable_indexscan = OFF;
|
||||
SET enable_indexonlyscan = OFF;
|
||||
SET enable_bitmapscan = OFF;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1
|
||||
-> Sort
|
||||
Sort Key: c1
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1;
|
||||
c1 | c2 | c3
|
||||
@ -3270,18 +3249,16 @@ select * from test_merge_index_test order by c1;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2
|
||||
-> Sort
|
||||
Sort Key: c1, c2
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1, c2
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
c1 | c2 | c3
|
||||
@ -3587,18 +3564,16 @@ select * from test_merge_index_test order by c1, c2;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2, c3
|
||||
-> Sort
|
||||
Sort Key: c1, c2, c3
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1, c2, c3
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
c1 | c2 | c3
|
||||
@ -3909,18 +3884,16 @@ SET enable_seqscan = OFF;
|
||||
SET enable_indexscan = ON;
|
||||
SET enable_indexonlyscan = OFF;
|
||||
SET enable_bitmapscan = OFF;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1
|
||||
-> Sort
|
||||
Sort Key: c1
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Index Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Index Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1;
|
||||
c1 | c2 | c3
|
||||
@ -4226,18 +4199,16 @@ select * from test_merge_index_test order by c1;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2
|
||||
-> Sort
|
||||
Sort Key: c1, c2
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Index Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1, c2
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Index Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
c1 | c2 | c3
|
||||
@ -4543,18 +4514,16 @@ select * from test_merge_index_test order by c1, c2;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2, c3
|
||||
-> Sort
|
||||
Sort Key: c1, c2, c3
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Index Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1, c2, c3
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Index Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
c1 | c2 | c3
|
||||
@ -4865,18 +4834,16 @@ SET enable_seqscan = OFF;
|
||||
SET enable_indexscan = OFF;
|
||||
SET enable_indexonlyscan = ON;
|
||||
SET enable_bitmapscan = OFF;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1
|
||||
-> Sort
|
||||
Sort Key: c1
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1;
|
||||
c1 | c2 | c3
|
||||
@ -5182,18 +5149,16 @@ select * from test_merge_index_test order by c1;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2
|
||||
-> Sort
|
||||
Sort Key: c1, c2
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1, c2
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
c1 | c2 | c3
|
||||
@ -5499,18 +5464,16 @@ select * from test_merge_index_test order by c1, c2;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2, c3
|
||||
-> Sort
|
||||
Sort Key: c1, c2, c3
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1, c2, c3
|
||||
-> Partition Iterator
|
||||
Iterations: 27
|
||||
-> Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1..27
|
||||
(6 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
c1 | c2 | c3
|
||||
@ -5851,18 +5814,14 @@ SET enable_seqscan = ON;
|
||||
SET enable_indexscan = OFF;
|
||||
SET enable_indexonlyscan = OFF;
|
||||
SET enable_bitmapscan = OFF;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1
|
||||
-> Sort
|
||||
Sort Key: c1
|
||||
-> Partition Iterator
|
||||
Iterations: 1
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(4 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1;
|
||||
c1 | c2 | c3
|
||||
@ -6168,18 +6127,14 @@ select * from test_merge_index_test order by c1;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2
|
||||
-> Sort
|
||||
Sort Key: c1, c2
|
||||
-> Partition Iterator
|
||||
Iterations: 1
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1, c2
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(4 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
c1 | c2 | c3
|
||||
@ -6485,18 +6440,14 @@ select * from test_merge_index_test order by c1, c2;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2, c3
|
||||
-> Sort
|
||||
Sort Key: c1, c2, c3
|
||||
-> Partition Iterator
|
||||
Iterations: 1
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(8 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------
|
||||
Sort
|
||||
Sort Key: c1, c2, c3
|
||||
-> Partitioned Seq Scan on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(4 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
c1 | c2 | c3
|
||||
@ -6807,16 +6758,12 @@ SET enable_seqscan = OFF;
|
||||
SET enable_indexscan = ON;
|
||||
SET enable_indexonlyscan = OFF;
|
||||
SET enable_bitmapscan = OFF;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1
|
||||
-> Partition Iterator
|
||||
Iterations: 1
|
||||
-> Partitioned Index Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(6 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------
|
||||
Partitioned Index Scan using idx2_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(2 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1;
|
||||
c1 | c2 | c3
|
||||
@ -7122,16 +7069,12 @@ select * from test_merge_index_test order by c1;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2
|
||||
-> Partition Iterator
|
||||
Iterations: 1
|
||||
-> Partitioned Index Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(6 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------
|
||||
Partitioned Index Scan using idx2_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(2 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
c1 | c2 | c3
|
||||
@ -7437,16 +7380,12 @@ select * from test_merge_index_test order by c1, c2;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2, c3
|
||||
-> Partition Iterator
|
||||
Iterations: 1
|
||||
-> Partitioned Index Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(6 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------
|
||||
Partitioned Index Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(2 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
c1 | c2 | c3
|
||||
@ -7757,16 +7696,12 @@ SET enable_seqscan = OFF;
|
||||
SET enable_indexscan = OFF;
|
||||
SET enable_indexonlyscan = ON;
|
||||
SET enable_bitmapscan = OFF;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1
|
||||
-> Partition Iterator
|
||||
Iterations: 1
|
||||
-> Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(6 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------
|
||||
Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(2 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1;
|
||||
c1 | c2 | c3
|
||||
@ -8072,16 +8007,12 @@ select * from test_merge_index_test order by c1;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2
|
||||
-> Partition Iterator
|
||||
Iterations: 1
|
||||
-> Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(6 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------
|
||||
Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(2 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2;
|
||||
c1 | c2 | c3
|
||||
@ -8387,16 +8318,12 @@ select * from test_merge_index_test order by c1, c2;
|
||||
299 | 299 | 299
|
||||
(299 rows)
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: c1, c2, c3
|
||||
-> Partition Iterator
|
||||
Iterations: 1
|
||||
-> Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(6 rows)
|
||||
EXPLAIN (COSTS OFF) select * from test_merge_index_test order by c1, c2, c3;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------
|
||||
Partitioned Index Only Scan using idx3_test_merge_index on test_merge_index_test
|
||||
Selected Partitions: 1
|
||||
(2 rows)
|
||||
|
||||
select * from test_merge_index_test order by c1, c2, c3;
|
||||
c1 | c2 | c3
|
||||
|
||||
@ -214,7 +214,7 @@ alter table test_add_column_check add column c int check (c>=0);
|
||||
-- failed
|
||||
insert into test_add_column_check values (-1, -1, -1);
|
||||
ERROR: new row for relation "test_add_column_check" violates check constraint "test_add_column_check_c_check"
|
||||
DETAIL: Failing row contains (-1, -1, -1).
|
||||
DETAIL: N/A
|
||||
-- success
|
||||
insert into test_add_column_check values (1, 1, 1);
|
||||
select * from test_add_column_check order by 1, 2;
|
||||
@ -268,11 +268,12 @@ insert into test_add_column_constraint values (0, 0);
|
||||
-- a. unique
|
||||
-- failed
|
||||
alter table test_add_column_constraint add column c1 int unique;
|
||||
ERROR: unique index columns must contain the partition key and collation must be default collation
|
||||
NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index "test_add_column_constraint_c1_tableoid_key" for table "test_add_column_constraint"
|
||||
-- b. primary key
|
||||
-- failed
|
||||
alter table test_add_column_constraint add column c2 int primary key;
|
||||
ERROR: unique index columns must contain the partition key and collation must be default collation
|
||||
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "test_add_column_constraint_pkey" for table "test_add_column_constraint"
|
||||
ERROR: column "c2" contains null values
|
||||
-- c. references
|
||||
create table test (a int primary key);
|
||||
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "test_pkey" for table "test"
|
||||
@ -352,9 +353,9 @@ select * from temp_View order by 1,2;
|
||||
drop view temp_view;
|
||||
drop table test_add_column_view;
|
||||
-- 11. test partitioned table has tablespace
|
||||
\! rm -fr '@testtablespace@/hw_partition_sql_adapt_ts1'
|
||||
\! mkdir '@testtablespace@/hw_partition_sql_adapt_ts1'
|
||||
create tablespace hw_partition_sql_adapt_ts1 location '@testtablespace@/hw_partition_sql_adapt_ts1';
|
||||
\! rm -fr '/data2/jiangyan/openGauss-server/src/test/regress/testtablespace/hw_partition_sql_adapt_ts1'
|
||||
\! mkdir '/data2/jiangyan/openGauss-server/src/test/regress/testtablespace/hw_partition_sql_adapt_ts1'
|
||||
create tablespace hw_partition_sql_adapt_ts1 location '/data2/jiangyan/openGauss-server/src/test/regress/testtablespace/hw_partition_sql_adapt_ts1';
|
||||
-- a. partitioned table has tablespace
|
||||
create table test_add_column_tablespace (a int, b int)
|
||||
tablespace hw_partition_sql_adapt_ts1
|
||||
@ -659,9 +660,9 @@ ERROR: index "temp_index" does not exist
|
||||
-- success
|
||||
drop table test_drop_column_index;
|
||||
-- 5. test table has tablespace
|
||||
\! rm -fr '@testtablespace@/hw_partition_sql_adapt_ts1'
|
||||
\! mkdir '@testtablespace@/hw_partition_sql_adapt_ts1'
|
||||
create tablespace hw_partition_sql_adapt_ts1 location '@testtablespace@/hw_partition_sql_adapt_ts1';
|
||||
\! rm -fr '/data2/jiangyan/openGauss-server/src/test/regress/testtablespace/hw_partition_sql_adapt_ts1'
|
||||
\! mkdir '/data2/jiangyan/openGauss-server/src/test/regress/testtablespace/hw_partition_sql_adapt_ts1'
|
||||
create tablespace hw_partition_sql_adapt_ts1 location '/data2/jiangyan/openGauss-server/src/test/regress/testtablespace/hw_partition_sql_adapt_ts1';
|
||||
-- a. partitioned table has tablespace
|
||||
create table test_drop_column_tablespace (a int, b int, c int, d int)
|
||||
tablespace hw_partition_sql_adapt_ts1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
-- 6. test table has tablespace
|
||||
\! rm -fr '@testtablespace@/hw_partition_sql_adapt_ts1'
|
||||
\! mkdir '@testtablespace@/hw_partition_sql_adapt_ts1'
|
||||
create tablespace hw_partition_sql_adapt_ts1 location '@testtablespace@/hw_partition_sql_adapt_ts1';
|
||||
\! rm -fr '/data2/jiangyan/openGauss-server/src/test/regress/testtablespace/hw_partition_sql_adapt_ts1'
|
||||
\! mkdir '/data2/jiangyan/openGauss-server/src/test/regress/testtablespace/hw_partition_sql_adapt_ts1'
|
||||
create tablespace hw_partition_sql_adapt_ts1 location '/data2/jiangyan/openGauss-server/src/test/regress/testtablespace/hw_partition_sql_adapt_ts1';
|
||||
-- a. partitioned table has tablespace
|
||||
create table test_modify_column_type_tablespace (a int, b int, c int, d int)
|
||||
tablespace hw_partition_sql_adapt_ts1
|
||||
|
||||
@ -960,9 +960,9 @@ comment on column test_comment.a is 'a is a column of test_comment';
|
||||
--------+---------+-----------+---------+--------------+-------------------------------
|
||||
a | integer | | plain | | a is a column of test_comment
|
||||
Indexes:
|
||||
"test_comment_index" btree (a) LOCAL(PARTITION test_comment_p1_a_idx, PARTITION test_comment_p2_a_idx, PARTITION test_comment_p3_a_idx) TABLESPACE pg_default
|
||||
Range partition by(a)
|
||||
Number of partition: 3 (View pg_partition to check each partition range.)
|
||||
"test_comment_index" btree (a) LOCAL TABLESPACE pg_default
|
||||
Partition By RANGE(a)
|
||||
Number of partitions: 3 (View pg_partition to check each partition range.)
|
||||
Has OIDs: no
|
||||
Options: orientation=row, compression=no
|
||||
|
||||
@ -1061,9 +1061,9 @@ drop user temp_user;
|
||||
drop table test_partition_foreign_key;
|
||||
----------------------
|
||||
-- test alter table set tablespace on ordinary table
|
||||
\! rm -fr '@testtablespace@/hw_partition_sql_adapt_ts1'
|
||||
\! mkdir '@testtablespace@/hw_partition_sql_adapt_ts1'
|
||||
create tablespace hw_partition_sql_adapt_ts1 location '@testtablespace@/hw_partition_sql_adapt_ts1';
|
||||
\! rm -fr '/data2/jiangyan/openGauss-server/src/test/regress/testtablespace/hw_partition_sql_adapt_ts1'
|
||||
\! mkdir '/data2/jiangyan/openGauss-server/src/test/regress/testtablespace/hw_partition_sql_adapt_ts1'
|
||||
create tablespace hw_partition_sql_adapt_ts1 location '/data2/jiangyan/openGauss-server/src/test/regress/testtablespace/hw_partition_sql_adapt_ts1';
|
||||
create table test_tablespace (a int) tablespace hw_partition_sql_adapt_ts1;
|
||||
select tablename, tablespace from pg_tables where tablename = 'test_tablespace';
|
||||
tablename | tablespace
|
||||
|
||||
@ -199,7 +199,7 @@ select count(*) from partition_truncate_table_0000;
|
||||
--50 rows
|
||||
rollback;
|
||||
select count(*) from partition_truncate_table_0000;
|
||||
ERROR: relation "partition_truncate_table_0000" does not exist
|
||||
ERROR: relation "partition_truncate_table_0000" does not exist on datanode1
|
||||
LINE 1: select count(*) from partition_truncate_table_0000;
|
||||
^
|
||||
--can not find the partitioned table
|
||||
|
||||
@ -331,7 +331,6 @@ create table partition_truncate_table2
|
||||
c1 int references partition_truncate_table1(c1),
|
||||
c2 int
|
||||
);
|
||||
ERROR: REFERENCES constraint is not yet supported.
|
||||
--insert into partition_truncate_table1 values (1,200);
|
||||
--insert into partition_truncate_table1 values (2,200);
|
||||
--insert into partition_truncate_table2 values (2,200);
|
||||
@ -347,7 +346,6 @@ ERROR: REFERENCES constraint is not yet supported.
|
||||
--select * from partition_truncate_table2;
|
||||
----0 rows
|
||||
drop table if exists partition_truncate_table1,partition_truncate_table2;
|
||||
NOTICE: table "partition_truncate_table2" does not exist, skipping
|
||||
create table partition_truncate_table1
|
||||
(
|
||||
c1 int unique,
|
||||
@ -365,20 +363,17 @@ partition by range (c1)
|
||||
partition partition_truncate_table2_p1 values less than (100),
|
||||
partition partition_truncate_table2_p2 values less than (150)
|
||||
);
|
||||
ERROR: REFERENCES constraint is not yet supported.
|
||||
insert into partition_truncate_table1 values (1,200);
|
||||
insert into partition_truncate_table1 values (2,200);
|
||||
insert into partition_truncate_table2 values (2,200);
|
||||
ERROR: relation "partition_truncate_table2" does not exist
|
||||
LINE 1: insert into partition_truncate_table2 values (2,200);
|
||||
^
|
||||
insert into partition_truncate_table2 values (2,200);
|
||||
ERROR: relation "partition_truncate_table2" does not exist
|
||||
LINE 1: insert into partition_truncate_table2 values (2,200);
|
||||
^
|
||||
truncate table partition_truncate_table1 restrict;
|
||||
ERROR: cannot truncate a table referenced in a foreign key constraint
|
||||
DETAIL: Table "partition_truncate_table2" references "partition_truncate_table1".
|
||||
HINT: Truncate table "partition_truncate_table2" at the same time, or use TRUNCATE ... CASCADE.
|
||||
--can't truncate table partition_truncate_table1
|
||||
truncate table partition_truncate_table1 cascade ;
|
||||
NOTICE: truncate cascades to table "partition_truncate_table2"
|
||||
select * from partition_truncate_table1 order by 1, 2;
|
||||
c1 | c2
|
||||
----+----
|
||||
@ -386,12 +381,12 @@ select * from partition_truncate_table1 order by 1, 2;
|
||||
|
||||
--0 rows
|
||||
select * from partition_truncate_table2 order by 1, 2;
|
||||
ERROR: relation "partition_truncate_table2" does not exist
|
||||
LINE 1: select * from partition_truncate_table2 order by 1, 2;
|
||||
^
|
||||
c1 | c2
|
||||
----+----
|
||||
(0 rows)
|
||||
|
||||
--0 rows
|
||||
drop table if exists partition_truncate_table1,partition_truncate_table2;
|
||||
NOTICE: table "partition_truncate_table2" does not exist, skipping
|
||||
--05--------------------------------------------------------------------
|
||||
--cascade test
|
||||
--partitioned table has fk on a partitioned table
|
||||
@ -446,6 +441,7 @@ revoke truncate on table partition_truncate_table from partition_truncate_user1;
|
||||
set session authorization partition_truncate_user1 password 'gauss@123';
|
||||
truncate partition_truncate_table;
|
||||
ERROR: permission denied for relation partition_truncate_table
|
||||
DETAIL: N/A
|
||||
--permission de
|
||||
reset session authorization;
|
||||
drop table partition_truncate_table;
|
||||
@ -513,12 +509,15 @@ revoke truncate on table partition_truncate_user1.partition_truncate_table from
|
||||
set session authorization partition_truncate_user1 password 'gauss@123';
|
||||
truncate partition_truncate_table;
|
||||
ERROR: permission denied for relation partition_truncate_table
|
||||
DETAIL: N/A
|
||||
--fail , no permission
|
||||
alter table partition_truncate_table truncate partition partition_truncate_table_p0;
|
||||
ERROR: permission denied for relation partition_truncate_table
|
||||
DETAIL: N/A
|
||||
--fail , no permission
|
||||
alter table partition_truncate_table truncate partition for (0);
|
||||
ERROR: permission denied for relation partition_truncate_table
|
||||
DETAIL: N/A
|
||||
--fail , no permission
|
||||
drop table partition_truncate_table;
|
||||
reset session authorization;
|
||||
@ -625,7 +624,7 @@ select count(*) from partition_truncate_table;
|
||||
truncate partition_truncate_table;
|
||||
rollback;
|
||||
select count(*) from partition_truncate_table;
|
||||
ERROR: relation "partition_truncate_table" does not exist
|
||||
ERROR: relation "partition_truncate_table" does not exist on datanode1
|
||||
LINE 1: select count(*) from partition_truncate_table;
|
||||
^
|
||||
--can not find the table
|
||||
@ -808,7 +807,7 @@ where c.relname = 'partition_truncate_table' and p.parentid = c.oid and ct.oid =
|
||||
truncate partition_truncate_table;
|
||||
rollback;
|
||||
select count(*) from partition_truncate_table;
|
||||
ERROR: relation "partition_truncate_table" does not exist
|
||||
ERROR: relation "partition_truncate_table" does not exist on datanode1
|
||||
LINE 1: select count(*) from partition_truncate_table;
|
||||
^
|
||||
--table do not exist
|
||||
|
||||
@ -1,33 +1,39 @@
|
||||
\! chmod 600 @abs_srcdir@/sslcert/*
|
||||
\! cp @abs_srcdir@/sslcert/server.* @abs_srcdir@/tmp_check/coordinator1
|
||||
\! cp @abs_srcdir@/sslcert/cacert.pem @abs_srcdir@/tmp_check/coordinator1
|
||||
\! chmod 600 /data2/jiangyan/openGauss-server/src/test/regress/sslcert/*
|
||||
\! cp /data2/jiangyan/openGauss-server/src/test/regress/sslcert/server.* /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1
|
||||
cp: target '/data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1' is not a directory
|
||||
\! cp /data2/jiangyan/openGauss-server/src/test/regress/sslcert/cacert.pem /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1
|
||||
\! export PGSSLMODE=verify-ca
|
||||
\! export PGSSLROOTCERT=@abs_srcdir@/sslcert/cacert.pem
|
||||
\! @abs_bindir@/gs_guc set -Z coordinator -D @abs_srcdir@/tmp_check/coordinator1 -c ssl=on >/dev/null 2>&1
|
||||
\! @abs_bindir@/gs_guc set -Z coordinator -D @abs_srcdir@/tmp_check/coordinator1 -c "ssl_ca_file='cacert.pem'" >/dev/null 2>&1
|
||||
\! @abs_bindir@/gs_guc set -Z coordinator -D @abs_srcdir@/tmp_check/coordinator1 -c "ssl_cert_file='server.crt'" >/dev/null 2>&1
|
||||
\! @abs_bindir@/gs_guc set -Z coordinator -D @abs_srcdir@/tmp_check/coordinator1 -c "ssl_key_file='server.key'" >/dev/null 2>&1
|
||||
\! sed -i 's#host.*all.*all.*127.0.0.1/32.*#hostssl all all 127.0.0.1/32 sha256#g' @abs_srcdir@/tmp_check/coordinator1/pg_hba.conf
|
||||
\! @abs_bindir@/gs_ctl stop -D @abs_srcdir@/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! @abs_bindir@/gs_ctl start -D @abs_srcdir@/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! export PGSSLROOTCERT=/data2/jiangyan/openGauss-server/src/test/regress/sslcert/cacert.pem
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_guc set -Z coordinator -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -c ssl=on >/dev/null 2>&1
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_guc set -Z coordinator -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -c "ssl_ca_file='cacert.pem'" >/dev/null 2>&1
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_guc set -Z coordinator -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -c "ssl_cert_file='server.crt'" >/dev/null 2>&1
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_guc set -Z coordinator -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -c "ssl_key_file='server.key'" >/dev/null 2>&1
|
||||
\! sed -i 's#host.*all.*all.*127.0.0.1/32.*#hostssl all all 127.0.0.1/32 sha256#g' /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/pg_hba.conf
|
||||
sed: can't read /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/pg_hba.conf: Not a directory
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_ctl stop -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_ctl start -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! sleep 5
|
||||
\! @abs_bindir@/gsql -d postgres -r -m -h 127.0.0.1 -p @portstring@ -W gauss@123 -c 'show ssl'
|
||||
ssl
|
||||
-----
|
||||
on
|
||||
(1 row)
|
||||
|
||||
\! rm -rf @abs_srcdir@/tmp_check/coordinator1/server.*
|
||||
\! rm -rf @abs_srcdir@/tmp_check/coordinator1/cacert.pem
|
||||
\! @abs_bindir@/gs_guc set -Z coordinator -D @abs_srcdir@/tmp_check/coordinator1 -c ssl=off >/dev/null 2>&1
|
||||
\! sed -i 's/^ssl_ca_file/#&/' @abs_srcdir@/tmp_check/coordinator1/postgresql.conf
|
||||
\! sed -i 's/^ssl_cert_file/#&/' @abs_srcdir@/tmp_check/coordinator1/postgresql.conf
|
||||
\! sed -i 's/^ssl_key_file/#&/' @abs_srcdir@/tmp_check/coordinator1/postgresql.conf
|
||||
\! sed -i 's#hostssl.*all.*all.*127.0.0.1/32.*sha256#host all all 127.0.0.1/32 sha256#g' @abs_srcdir@/tmp_check/coordinator1/pg_hba.conf
|
||||
\! @abs_bindir@/gs_ctl stop -D @abs_srcdir@/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! @abs_bindir@/gs_ctl start -D @abs_srcdir@/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! sleep 5
|
||||
\! @abs_bindir@/gsql -d postgres -h 127.0.0.1 -p @portstring@ -W gauss@123 -c 'show ssl'
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gsql -d postgres -r -m -h 127.0.0.1 -p 25632 -W gauss@123 -c 'show ssl'
|
||||
ssl
|
||||
-----
|
||||
off
|
||||
(1 row)
|
||||
|
||||
\! rm -rf /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/server.*
|
||||
\! rm -rf /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/cacert.pem
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_guc set -Z coordinator -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -c ssl=off >/dev/null 2>&1
|
||||
\! sed -i 's/^ssl_ca_file/#&/' /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/postgresql.conf
|
||||
sed: can't read /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/postgresql.conf: Not a directory
|
||||
\! sed -i 's/^ssl_cert_file/#&/' /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/postgresql.conf
|
||||
sed: can't read /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/postgresql.conf: Not a directory
|
||||
\! sed -i 's/^ssl_key_file/#&/' /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/postgresql.conf
|
||||
sed: can't read /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/postgresql.conf: Not a directory
|
||||
\! sed -i 's#hostssl.*all.*all.*127.0.0.1/32.*sha256#host all all 127.0.0.1/32 sha256#g' /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/pg_hba.conf
|
||||
sed: can't read /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/pg_hba.conf: Not a directory
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_ctl stop -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_ctl start -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! sleep 5
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gsql -d postgres -h 127.0.0.1 -p 25632 -W gauss@123 -c 'show ssl'
|
||||
ssl
|
||||
-----
|
||||
off
|
||||
|
||||
@ -1,35 +1,36 @@
|
||||
\! chmod 600 @abs_srcdir@/sslcert_withpwd/*
|
||||
\! @abs_bindir@/gs_guc encrypt -M client -K Gauss@123 -D @abs_srcdir@/sslcert_withpwd/ > /dev/null 2>&1
|
||||
gs_guc encrypt -M client -K ***
|
||||
\! @abs_bindir@/gs_guc encrypt -M server -K Gauss@123 -D @abs_srcdir@/sslcert_withpwd/ > /dev/null 2>&1
|
||||
gs_guc encrypt -M server -K ***
|
||||
\! cp @abs_srcdir@/sslcert_withpwd/server.* @abs_srcdir@/tmp_check/coordinator1
|
||||
\! cp @abs_srcdir@/sslcert_withpwd/client.* @abs_srcdir@/tmp_check/coordinator1
|
||||
\! cp @abs_srcdir@/sslcert_withpwd/cacert.pem @abs_srcdir@/tmp_check/coordinator1
|
||||
\! chmod 600 /data2/jiangyan/openGauss-server/src/test/regress/sslcert_withpwd/*
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_guc encrypt -M client -K Gauss@123 -D /data2/jiangyan/openGauss-server/src/test/regress/sslcert_withpwd/ > /dev/null 2>&1
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_guc encrypt -M server -K Gauss@123 -D /data2/jiangyan/openGauss-server/src/test/regress/sslcert_withpwd/ > /dev/null 2>&1
|
||||
\! cp /data2/jiangyan/openGauss-server/src/test/regress/sslcert_withpwd/server.* /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1
|
||||
cp: target '/data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1' is not a directory
|
||||
\! cp /data2/jiangyan/openGauss-server/src/test/regress/sslcert_withpwd/client.* /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1
|
||||
cp: target '/data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1' is not a directory
|
||||
\! cp /data2/jiangyan/openGauss-server/src/test/regress/sslcert_withpwd/cacert.pem /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1
|
||||
\setenv PGSSLMODE prefer
|
||||
\! echo $PGSSLMODE
|
||||
prefer
|
||||
\setenv PGSSLROOTCERT @abs_srcdir@/tmp_check/coordinator1/cacert.pem
|
||||
\setenv PGSSLROOTCERT /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/cacert.pem
|
||||
\! echo $PGSSLROOTCERT
|
||||
@abs_srcdir@/tmp_check/coordinator1/cacert.pem
|
||||
\setenv PGSSLCERT @abs_srcdir@/tmp_check/coordinator1/client.crt
|
||||
/data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/cacert.pem
|
||||
\setenv PGSSLCERT /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/client.crt
|
||||
\! echo $PGSSLCERT
|
||||
@abs_srcdir@/tmp_check/coordinator1/client.crt
|
||||
\setenv PGSSLKEY @abs_srcdir@/tmp_check/coordinator1/client.key
|
||||
/data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/client.crt
|
||||
\setenv PGSSLKEY /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/client.key
|
||||
\! echo $PGSSLKEY
|
||||
@abs_srcdir@/tmp_check/coordinator1/client.key
|
||||
\! @abs_bindir@/gs_guc set -Z coordinator -D @abs_srcdir@/tmp_check/coordinator1 -c ssl=on >/dev/null 2>&1
|
||||
\! @abs_bindir@/gs_guc set -Z coordinator -D @abs_srcdir@/tmp_check/coordinator1 -c "ssl_ca_file='cacert.pem'" >/dev/null 2>&1
|
||||
\! @abs_bindir@/gs_guc set -Z coordinator -D @abs_srcdir@/tmp_check/coordinator1 -c "ssl_cert_file='server.crt'" >/dev/null 2>&1
|
||||
\! @abs_bindir@/gs_guc set -Z coordinator -D @abs_srcdir@/tmp_check/coordinator1 -c "ssl_key_file='server.key'" >/dev/null 2>&1
|
||||
\! sed -i 's#host.*all.*all.*127.0.0.1/32.*#hostssl all all 127.0.0.1/32 sha256#g' @abs_srcdir@/tmp_check/coordinator1/pg_hba.conf
|
||||
\! @abs_bindir@/gs_ctl stop -D @abs_srcdir@/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! @abs_bindir@/gs_ctl start -D @abs_srcdir@/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
/data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/client.key
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_guc set -Z coordinator -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -c ssl=on >/dev/null 2>&1
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_guc set -Z coordinator -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -c "ssl_ca_file='cacert.pem'" >/dev/null 2>&1
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_guc set -Z coordinator -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -c "ssl_cert_file='server.crt'" >/dev/null 2>&1
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_guc set -Z coordinator -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -c "ssl_key_file='server.key'" >/dev/null 2>&1
|
||||
\! sed -i 's#host.*all.*all.*127.0.0.1/32.*#hostssl all all 127.0.0.1/32 sha256#g' /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/pg_hba.conf
|
||||
sed: can't read /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/pg_hba.conf: Not a directory
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_ctl stop -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_ctl start -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! sleep 5
|
||||
\! @abs_bindir@/gsql -d postgres -r -h 127.0.0.1 -p @portstring@ -W gauss@123 -c 'show ssl'
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gsql -d postgres -r -h 127.0.0.1 -p 25632 -W gauss@123 -c 'show ssl'
|
||||
ssl
|
||||
-----
|
||||
on
|
||||
off
|
||||
(1 row)
|
||||
|
||||
\setenv PGSSLMODE
|
||||
@ -44,31 +45,36 @@ prefer
|
||||
\setenv PGSSLKEY
|
||||
\! echo $PGSSLKEY
|
||||
|
||||
\! sed -i 's#hostssl.*all.*all.*127.0.0.1/32.*sha256#host all all 127.0.0.1/32 sha256#g' @abs_srcdir@/tmp_check/coordinator1/pg_hba.conf
|
||||
\! @abs_bindir@/gs_ctl stop -D @abs_srcdir@/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! @abs_bindir@/gs_ctl start -D @abs_srcdir@/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! @abs_bindir@/gsql -d postgres -r -h 127.0.0.1 -p @portstring@ -W gauss@123 -c 'show ssl'
|
||||
ssl
|
||||
-----
|
||||
on
|
||||
(1 row)
|
||||
|
||||
\! rm -rf @abs_srcdir@/tmp_check/coordinator1/server.*
|
||||
\! rm -rf @abs_srcdir@/tmp_check/coordinator1/client.*
|
||||
\! rm -rf @abs_srcdir@/tmp_check/coordinator1/cacert.pem
|
||||
\! @abs_bindir@/gs_guc set -Z coordinator -D @abs_srcdir@/tmp_check/coordinator1 -c ssl=off >/dev/null 2>&1
|
||||
\! sed -i 's/^ssl_ca_file/#&/' @abs_srcdir@/tmp_check/coordinator1/postgresql.conf
|
||||
\! sed -i 's/^ssl_cert_file/#&/' @abs_srcdir@/tmp_check/coordinator1/postgresql.conf
|
||||
\! sed -i 's/^ssl_key_file/#&/' @abs_srcdir@/tmp_check/coordinator1/postgresql.conf
|
||||
\! sed -i 's#hostssl.*all.*all.*127.0.0.1/32.*sha256#host all all 127.0.0.1/32 sha256#g' @abs_srcdir@/tmp_check/coordinator1/pg_hba.conf
|
||||
\! @abs_bindir@/gs_ctl stop -D @abs_srcdir@/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! @abs_bindir@/gs_ctl start -D @abs_srcdir@/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! sleep 5
|
||||
\! @abs_bindir@/gsql -d postgres -h 127.0.0.1 -p @portstring@ -W gauss@123 -c 'show ssl'
|
||||
\! sed -i 's#hostssl.*all.*all.*127.0.0.1/32.*sha256#host all all 127.0.0.1/32 sha256#g' /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/pg_hba.conf
|
||||
sed: can't read /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/pg_hba.conf: Not a directory
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_ctl stop -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_ctl start -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gsql -d postgres -r -h 127.0.0.1 -p 25632 -W gauss@123 -c 'show ssl'
|
||||
ssl
|
||||
-----
|
||||
off
|
||||
(1 row)
|
||||
|
||||
\! rm -rf @abs_srcdir@/sslcert_withpwd/server.key.*
|
||||
\! rm -rf @abs_srcdir@/sslcert_withpwd/client.key.*
|
||||
\! rm -rf /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/server.*
|
||||
\! rm -rf /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/client.*
|
||||
\! rm -rf /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/cacert.pem
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_guc set -Z coordinator -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -c ssl=off >/dev/null 2>&1
|
||||
\! sed -i 's/^ssl_ca_file/#&/' /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/postgresql.conf
|
||||
sed: can't read /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/postgresql.conf: Not a directory
|
||||
\! sed -i 's/^ssl_cert_file/#&/' /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/postgresql.conf
|
||||
sed: can't read /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/postgresql.conf: Not a directory
|
||||
\! sed -i 's/^ssl_key_file/#&/' /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/postgresql.conf
|
||||
sed: can't read /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/postgresql.conf: Not a directory
|
||||
\! sed -i 's#hostssl.*all.*all.*127.0.0.1/32.*sha256#host all all 127.0.0.1/32 sha256#g' /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/pg_hba.conf
|
||||
sed: can't read /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1/pg_hba.conf: Not a directory
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_ctl stop -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gs_ctl start -D /data2/jiangyan/openGauss-server/src/test/regress/tmp_check/coordinator1 -Z coordinator > /dev/null
|
||||
\! sleep 5
|
||||
\! /data2/jiangyan/openGauss-server/src/test/regress/./tmp_check/install//data2/jiangyan/openGauss-server_/dest/bin/gsql -d postgres -h 127.0.0.1 -p 25632 -W gauss@123 -c 'show ssl'
|
||||
ssl
|
||||
-----
|
||||
off
|
||||
(1 row)
|
||||
|
||||
\! rm -rf /data2/jiangyan/openGauss-server/src/test/regress/sslcert_withpwd/server.key.*
|
||||
\! rm -rf /data2/jiangyan/openGauss-server/src/test/regress/sslcert_withpwd/client.key.*
|
||||
|
||||
@ -6,82 +6,70 @@ set qrw_inlist2join_optmode=-1;
|
||||
ERROR: invalid value for parameter "qrw_inlist2join_optmode": "-1"
|
||||
DETAIL: Available values: disable, cost_base, rule_base, or any positive integer as a inlist2join threshold
|
||||
set qrw_inlist2join_optmode=cost_base;
|
||||
create table t1(c1 int, c2 int, c3 int) distribute by hash(c1);
|
||||
copy t1 from '@abs_srcdir@/data/inlist2join.data';
|
||||
create table t2(c1 int, c2 int, c3 int) distribute by hash(c1);
|
||||
create table t1(c1 int, c2 int, c3 int);
|
||||
copy t1 from '/data2/jiangyan/openGauss-server/src/test/regress/data/inlist2join.data';
|
||||
create table t2(c1 int, c2 int, c3 int);
|
||||
insert into t2 select * from t1;
|
||||
ANALYZE t1;
|
||||
ANALYZE t2;
|
||||
-- T_HashJoin T_Stream T_SubqueryScan
|
||||
explain (costs off) select t2.c3, t2.c2 from t2 where t2.c1 > 1 AND t2.c2 in (select t1.c2 from t1 where t1.c1 IN (22376, 7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793,30622,54667,71608,83944,40124,90224,11409,47022,93382,33348,22693,40793,84920,13919,79189, 6675,49103,65433,12945,31682, 2106,42248,61990,66384,86546,62487,60545,74527,73315,42924,47691,88203,67892,26852,72041,35315,33527,57991, 5747, 45109,74104,17051,73311,67981,72523,89732,97553, 7721, 2093,60644,66857,18634,79095,44341,11184,72487, 3615,48173,17393,27185, 6279,69965,22133, 2138,33295,32935,49062,76352,27384,49675,39611,11423, 3726,43077,97087,70532,47240,74421,83989,59023,29279)) order by 1,2;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: t2.c3, t2.c2
|
||||
-> Sort
|
||||
Sort Key: t2.c3, t2.c2
|
||||
-> Hash Semi Join
|
||||
Hash Cond: (t2.c2 = inlist2join_cost_base.t1.c2)
|
||||
-> Seq Scan on t2
|
||||
Filter: (c1 > 1)
|
||||
-> Hash
|
||||
-> Streaming(type: BROADCAST)
|
||||
-> Hash Semi Join
|
||||
Hash Cond: (inlist2join_cost_base.t1.c1 = "*VALUES*".column1)
|
||||
-> Seq Scan on t1
|
||||
-> Hash
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
-> Values Scan on "*VALUES*"
|
||||
(16 rows)
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: t2.c3, t2.c2
|
||||
-> Hash Semi Join
|
||||
Hash Cond: (t2.c2 = inlist2join_cost_base.t1.c2)
|
||||
-> Seq Scan on t2
|
||||
Filter: (c1 > 1)
|
||||
-> Hash
|
||||
-> Hash Semi Join
|
||||
Hash Cond: (inlist2join_cost_base.t1.c1 = "*VALUES*".column1)
|
||||
-> Seq Scan on t1
|
||||
-> Hash
|
||||
-> Values Scan on "*VALUES*"
|
||||
(12 rows)
|
||||
|
||||
-- T_MergeJoin
|
||||
set enable_hashjoin =off;
|
||||
explain (costs off) select t2.c3, t2.c2 from t2 where t2.c1 > 1 AND t2.c2 in (select t1.c2 from t1 where t1.c1 IN (22376, 7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793,30622,54667,71608,83944,40124,90224,11409,47022,93382,33348,22693,40793,84920,13919,79189, 6675,49103,65433,12945,31682, 2106,42248,61990,66384,86546,62487,60545,74527,73315,42924,47691,88203,67892,26852,72041,35315,33527,57991, 5747, 45109,74104,17051,73311,67981,72523,89732,97553, 7721, 2093,60644,66857,18634,79095,44341,11184,72487, 3615,48173,17393,27185, 6279,69965,22133, 2138,33295,32935,49062,76352,27384,49675,39611,11423, 3726,43077,97087,70532,47240,74421,83989,59023,29279)) order by 1,2;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: t2.c3, t2.c2
|
||||
-> Sort
|
||||
Sort Key: t2.c3, t2.c2
|
||||
-> Merge Semi Join
|
||||
Merge Cond: (t2.c2 = inlist2join_cost_base.t1.c2)
|
||||
-> Sort
|
||||
Sort Key: t2.c2
|
||||
-> Seq Scan on t2
|
||||
Filter: (c1 > 1)
|
||||
-> Sort
|
||||
Sort Key: inlist2join_cost_base.t1.c2
|
||||
-> Streaming(type: BROADCAST)
|
||||
-> Merge Semi Join
|
||||
Merge Cond: (inlist2join_cost_base.t1.c1 = "*VALUES*".column1)
|
||||
-> Sort
|
||||
Sort Key: inlist2join_cost_base.t1.c1
|
||||
-> Seq Scan on t1
|
||||
-> Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
-> Values Scan on "*VALUES*"
|
||||
(22 rows)
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: t2.c3, t2.c2
|
||||
-> Merge Semi Join
|
||||
Merge Cond: (t2.c2 = inlist2join_cost_base.t1.c2)
|
||||
-> Sort
|
||||
Sort Key: t2.c2
|
||||
-> Seq Scan on t2
|
||||
Filter: (c1 > 1)
|
||||
-> Sort
|
||||
Sort Key: inlist2join_cost_base.t1.c2
|
||||
-> Merge Semi Join
|
||||
Merge Cond: (inlist2join_cost_base.t1.c1 = "*VALUES*".column1)
|
||||
-> Sort
|
||||
Sort Key: inlist2join_cost_base.t1.c1
|
||||
-> Seq Scan on t1
|
||||
-> Sort
|
||||
Sort Key: "*VALUES*".column1
|
||||
-> Values Scan on "*VALUES*"
|
||||
(18 rows)
|
||||
|
||||
-- T_MergeJoin T_Material
|
||||
set enable_mergejoin = off;
|
||||
explain (costs off) select t2.c3, t2.c2 from t2 where t2.c1 > 1 AND t2.c2 in (select t1.c2 from t1 where t1.c1 IN (22376, 7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793,30622,54667,71608,83944,40124,90224,11409,47022,93382,33348,22693,40793,84920,13919,79189, 6675,49103,65433,12945,31682, 2106,42248,61990,66384,86546,62487,60545,74527,73315,42924,47691,88203,67892,26852,72041,35315,33527,57991, 5747, 45109,74104,17051,73311,67981,72523,89732,97553, 7721, 2093,60644,66857,18634,79095,44341,11184,72487, 3615,48173,17393,27185, 6279,69965,22133, 2138,33295,32935,49062,76352,27384,49675,39611,11423, 3726,43077,97087,70532,47240,74421,83989,59023,29279)) order by 1,2;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: t2.c3, t2.c2
|
||||
-> Sort
|
||||
Sort Key: t2.c3, t2.c2
|
||||
-> Nested Loop Semi Join
|
||||
Join Filter: (t2.c2 = t1.c2)
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
-> Seq Scan on t2
|
||||
Filter: (c1 > 1)
|
||||
-> Materialize
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
-> Seq Scan on t1
|
||||
Filter: (c1 = ANY ('{22376,7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793,30622,54667,71608,83944,40124,90224,11409,47022,93382,33348,22693,40793,84920,13919,79189,6675,49103,65433,12945,31682,2106,42248,61990,66384,86546,62487,60545,74527,73315,42924,47691,88203,67892,26852,72041,35315,33527,57991,5747,45109,74104,17051,73311,67981,72523,89732,97553,7721,2093,60644,66857,18634,79095,44341,11184,72487,3615,48173,17393,27185,6279,69965,22133,2138,33295,32935,49062,76352,27384,49675,39611,11423,3726,43077,97087,70532,47240,74421,83989,59023,29279}'::integer[]))
|
||||
(13 rows)
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: t2.c3, t2.c2
|
||||
-> Nested Loop Semi Join
|
||||
Join Filter: (t2.c2 = t1.c2)
|
||||
-> Seq Scan on t2
|
||||
Filter: (c1 > 1)
|
||||
-> Materialize
|
||||
-> Seq Scan on t1
|
||||
Filter: (c1 = ANY ('{22376,7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793,30622,54667,71608,83944,40124,90224,11409,47022,93382,33348,22693,40793,84920,13919,79189,6675,49103,65433,12945,31682,2106,42248,61990,66384,86546,62487,60545,74527,73315,42924,47691,88203,67892,26852,72041,35315,33527,57991,5747,45109,74104,17051,73311,67981,72523,89732,97553,7721,2093,60644,66857,18634,79095,44341,11184,72487,3615,48173,17393,27185,6279,69965,22133,2138,33295,32935,49062,76352,27384,49675,39611,11423,3726,43077,97087,70532,47240,74421,83989,59023,29279}'::integer[]))
|
||||
(9 rows)
|
||||
|
||||
create index index1 on t1(c1);
|
||||
create index index2 on t2(c1);
|
||||
@ -90,34 +78,29 @@ set enable_nestloop =on;
|
||||
set enable_hashjoin = on;
|
||||
set enable_bitmapscan = off;
|
||||
explain (costs off) select * from (select * from t1 where t1.c1 in (22376, 7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793) union all select * from t2) as dt where dt.c1 in ( 2093,60644,66857,18634,79095,44341,11184,72487, 3615,48173,17393,27185, 6279,69965,22133, 2138,33295,32935,49062,76352,27384,49675,39611,11423, 3726,43077,97087,70532,47240,74421,83989,59023,29279) order by 1;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
Merge Sort Key: inlist2join_cost_base.t1.c1
|
||||
-> Sort
|
||||
Sort Key: inlist2join_cost_base.t1.c1
|
||||
-> Result
|
||||
-> Append
|
||||
-> Nested Loop Semi Join
|
||||
Join Filter: (inlist2join_cost_base.t1.c1 = "*VALUES*".column1)
|
||||
-> Nested Loop
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
-> HashAggregate
|
||||
Group By Key: "*VALUES*".column1
|
||||
-> Values Scan on "*VALUES*"
|
||||
-> Index Scan using index1 on t1
|
||||
Index Cond: (c1 = "*VALUES*".column1)
|
||||
-> Materialize
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
-> Values Scan on "*VALUES*"
|
||||
-> Index Scan using index2 on t2
|
||||
Index Cond: (c1 = ANY ('{2093,60644,66857,18634,79095,44341,11184,72487,3615,48173,17393,27185,6279,69965,22133,2138,33295,32935,49062,76352,27384,49675,39611,11423,3726,43077,97087,70532,47240,74421,83989,59023,29279}'::integer[]))
|
||||
(20 rows)
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Sort
|
||||
Sort Key: inlist2join_cost_base.t1.c1
|
||||
-> Result
|
||||
-> Append
|
||||
-> Hash Semi Join
|
||||
Hash Cond: (inlist2join_cost_base.t1.c1 = "*VALUES*".column1)
|
||||
-> Nested Loop
|
||||
-> HashAggregate
|
||||
Group By Key: "*VALUES*".column1
|
||||
-> Values Scan on "*VALUES*"
|
||||
-> Index Scan using index1 on t1
|
||||
Index Cond: (c1 = "*VALUES*".column1)
|
||||
-> Hash
|
||||
-> Values Scan on "*VALUES*"
|
||||
-> Index Scan using index2 on t2
|
||||
Index Cond: (c1 = ANY ('{2093,60644,66857,18634,79095,44341,11184,72487,3615,48173,17393,27185,6279,69965,22133,2138,33295,32935,49062,76352,27384,49675,39611,11423,3726,43077,97087,70532,47240,74421,83989,59023,29279}'::integer[]))
|
||||
(16 rows)
|
||||
|
||||
-- T_MergeAppend
|
||||
-- partition table
|
||||
create table t1_p(c1 int, c2 int, c3 int)
|
||||
distribute by hash(c1)
|
||||
PARTITION BY RANGE(c1)
|
||||
(
|
||||
PARTITION P1 VALUES LESS THAN(20000),
|
||||
@ -127,7 +110,6 @@ PARTITION P4 VALUES LESS THAN(80000),
|
||||
PARTITION P8 VALUES LESS THAN(MAXVALUE)
|
||||
);
|
||||
create table t2_p(c1 int, c2 int, c3 int)
|
||||
distribute by hash(c1)
|
||||
PARTITION BY RANGE(c1)
|
||||
(
|
||||
PARTITION P1 VALUES LESS THAN(30000),
|
||||
@ -141,11 +123,19 @@ ANALYZE t1_p;
|
||||
ANALYZE t2_p;
|
||||
-- T_PartIterator
|
||||
explain (costs off) select t2_p.c2 from t2_p join t1_p on t1_p.c1=t2_p.c2 and t2_p.c2 in (1,2,3,4,5,6,7,8,9,10,11);
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
-> Nested Loop
|
||||
Join Filter: (inlist2join_cost_base.t2_p.c2 = inlist2join_cost_base.t1_p.c1)
|
||||
QUERY PLAN
|
||||
--------------------------------------------------------------------------------
|
||||
Nested Loop
|
||||
Join Filter: (inlist2join_cost_base.t2_p.c2 = inlist2join_cost_base.t1_p.c1)
|
||||
-> Hash Semi Join
|
||||
Hash Cond: (inlist2join_cost_base.t2_p.c2 = "*VALUES*".column1)
|
||||
-> Partition Iterator
|
||||
Iterations: 4
|
||||
-> Partitioned Seq Scan on t2_p
|
||||
Selected Partitions: 1..4
|
||||
-> Hash
|
||||
-> Values Scan on "*VALUES*"
|
||||
-> Materialize
|
||||
-> Hash Semi Join
|
||||
Hash Cond: (inlist2join_cost_base.t1_p.c1 = "*VALUES*".column1)
|
||||
-> Partition Iterator
|
||||
@ -153,66 +143,44 @@ explain (costs off) select t2_p.c2 from t2_p join t1_p on t1_p.c1=t2_p.c2 and t2
|
||||
-> Partitioned Seq Scan on t1_p
|
||||
Selected Partitions: 1..5
|
||||
-> Hash
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
-> Values Scan on "*VALUES*"
|
||||
-> Materialize
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
-> Hash Semi Join
|
||||
Hash Cond: (inlist2join_cost_base.t2_p.c2 = "*VALUES*".column1)
|
||||
-> Partition Iterator
|
||||
Iterations: 4
|
||||
-> Partitioned Seq Scan on t2_p
|
||||
Selected Partitions: 1..4
|
||||
-> Hash
|
||||
-> Values Scan on "*VALUES*"
|
||||
(22 rows)
|
||||
-> Values Scan on "*VALUES*"
|
||||
(19 rows)
|
||||
|
||||
set enable_nestloop =off;
|
||||
explain (costs off) select t2_p.c2 from t2_p join t1_p on t1_p.c1=t2_p.c2 and t2_p.c2 in (22376, 7697,91842,32482,49627,89493,83303,64430,62630,12468,41219,86264,57512,26467,83933,90814,96326,94490,16793,30622,54667,71608,83944,40124,90224,11409,47022,93382,33348,22693,40793,84920,13919,79189, 6675,49103,65433,12945,31682, 2106,42248,61990,66384,86546,62487,60545,74527,73315,42924,47691,88203,67892,26852,72041,35315,33527,57991, 5747, 45109,74104,17051,73311,67981,72523,89732,97553, 7721, 2093,60644,66857,18634,79095,44341,11184,72487, 3615,48173,17393,27185, 6279,69965,22133, 2138,33295,32935,49062,76352,27384,49675,39611,11423, 3726,43077,97087,70532,47240,74421,83989,59023,29279);
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
-> Hash Join
|
||||
Hash Cond: (inlist2join_cost_base.t2_p.c2 = inlist2join_cost_base.t1_p.c1)
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
-> Hash Semi Join
|
||||
Hash Cond: (inlist2join_cost_base.t2_p.c2 = "*VALUES*".column1)
|
||||
-> Partition Iterator
|
||||
Iterations: 4
|
||||
-> Partitioned Seq Scan on t2_p
|
||||
Selected Partitions: 1..4
|
||||
-> Hash
|
||||
-> Values Scan on "*VALUES*"
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------------
|
||||
Hash Join
|
||||
Hash Cond: (inlist2join_cost_base.t1_p.c1 = inlist2join_cost_base.t2_p.c2)
|
||||
-> Hash Semi Join
|
||||
Hash Cond: (inlist2join_cost_base.t1_p.c1 = "*VALUES*".column1)
|
||||
-> Partition Iterator
|
||||
Iterations: 5
|
||||
-> Partitioned Seq Scan on t1_p
|
||||
Selected Partitions: 1..5
|
||||
-> Hash
|
||||
-> Hash Semi Join
|
||||
Hash Cond: (inlist2join_cost_base.t1_p.c1 = "*VALUES*".column1)
|
||||
-> Partition Iterator
|
||||
Iterations: 5
|
||||
-> Partitioned Seq Scan on t1_p
|
||||
Selected Partitions: 1..5
|
||||
-> Hash
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
-> Values Scan on "*VALUES*"
|
||||
(22 rows)
|
||||
-> Values Scan on "*VALUES*"
|
||||
-> Hash
|
||||
-> Hash Semi Join
|
||||
Hash Cond: (inlist2join_cost_base.t2_p.c2 = "*VALUES*".column1)
|
||||
-> Partition Iterator
|
||||
Iterations: 4
|
||||
-> Partitioned Seq Scan on t2_p
|
||||
Selected Partitions: 1..4
|
||||
-> Hash
|
||||
-> Values Scan on "*VALUES*"
|
||||
(19 rows)
|
||||
|
||||
set enable_nestloop =on;
|
||||
-- T_WindowAgg plan
|
||||
explain (costs off) select c1,c2,avg(c3) OVER (PARTITION BY c1) from t1 where t1.c1 in (1,2,3,4,5,6,7,8,9,10,11) and t1.c2 in (1,2);
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------
|
||||
Streaming (type: GATHER)
|
||||
-> WindowAgg
|
||||
-> Sort
|
||||
Sort Key: inlist2join_cost_base.t1.c1
|
||||
-> Nested Loop
|
||||
-> Streaming(type: REDISTRIBUTE)
|
||||
-> HashAggregate
|
||||
Group By Key: "*VALUES*".column1
|
||||
-> Values Scan on "*VALUES*"
|
||||
-> Index Scan using index1 on t1
|
||||
Index Cond: (c1 = "*VALUES*".column1)
|
||||
Filter: (c2 = ANY ('{1,2}'::integer[]))
|
||||
(12 rows)
|
||||
QUERY PLAN
|
||||
-------------------------------------------------------------------------
|
||||
WindowAgg
|
||||
-> Index Scan using index1 on t1
|
||||
Index Cond: (c1 = ANY ('{1,2,3,4,5,6,7,8,9,10,11}'::integer[]))
|
||||
Filter: (c2 = ANY ('{1,2}'::integer[]))
|
||||
(4 rows)
|
||||
|
||||
drop schema inlist2join_cost_base cascade;
|
||||
NOTICE: drop cascades to 4 other objects
|
||||
|
||||
@ -71,7 +71,7 @@ CREATE TABLE vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_02(
|
||||
C_DP double precision,
|
||||
C_DATE DATE,
|
||||
C_TS_WITHOUT TIMESTAMP WITHOUT TIME ZONE,
|
||||
C_TS_WITH TIMESTAMP WITH TIME ZONE, PARTIAL CLUSTER KEY(C_INT))WITH (ORIENTATION=COLUMN) DISTRIBUTE BY HASH (C_INT);
|
||||
C_TS_WITH TIMESTAMP WITH TIME ZONE, PARTIAL CLUSTER KEY(C_INT))WITH (ORIENTATION=COLUMN);
|
||||
CREATE TABLE vector_hashjoin_engine.ROW_HASHJOIN_TABLE_03(
|
||||
C_CHAR_1 CHAR(1),
|
||||
C_CHAR_2 CHAR(10),
|
||||
@ -141,47 +141,47 @@ CREATE TABLE vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_03(
|
||||
c1 int
|
||||
,c2 int
|
||||
,c3 char(100)
|
||||
)distribute by hash(c1);
|
||||
);
|
||||
create table vector_hashjoin_engine.ROW_HASHJOIN_TABLE_06
|
||||
(
|
||||
c1 int
|
||||
,c2 int
|
||||
,c3 char(100)
|
||||
)distribute by hash(c2);
|
||||
);
|
||||
create table vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_05
|
||||
(
|
||||
c1 int
|
||||
,c2 int
|
||||
,c3 char(100)
|
||||
)with (orientation = column) distribute by hash(c1);
|
||||
)with (orientation = column);
|
||||
create table vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_06
|
||||
(
|
||||
c1 int
|
||||
,c2 int
|
||||
,c3 char(100)
|
||||
)with (orientation = column) distribute by hash(c2);
|
||||
)with (orientation = column);
|
||||
create table vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_09
|
||||
(
|
||||
c1 int1
|
||||
,c2 int
|
||||
)with (orientation = column) distribute by hash(c2);
|
||||
)with (orientation = column);
|
||||
create table vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_10
|
||||
(
|
||||
c1 int1
|
||||
,c2 int
|
||||
)with (orientation = column) distribute by hash(c2);
|
||||
)with (orientation = column);
|
||||
create table vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_13
|
||||
(
|
||||
c1 int not null
|
||||
,c2 bigint not null
|
||||
,c3 char(6) not null
|
||||
)with (orientation = column) distribute by hash(c1);
|
||||
)with (orientation = column);
|
||||
create table vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_14
|
||||
(
|
||||
c1 int not null
|
||||
,c2 bigint not null
|
||||
,c3 char(6) not null
|
||||
)with (orientation = column) distribute by hash(c1);
|
||||
)with (orientation = column);
|
||||
CREATE OR REPLACE PROCEDURE func_insert_tbl_hashjoin_01()
|
||||
AS
|
||||
BEGIN
|
||||
@ -260,9 +260,9 @@ CALL func_insert_tbl_hashjoin_04();
|
||||
|
||||
\parallel on 2
|
||||
--insert into ROW_HASHJOIN_TABLE_05 select generate_series(1,2000), generate_series(1,2000), 'row'|| generate_series(1,2000);
|
||||
copy ROW_HASHJOIN_TABLE_05 from '@abs_srcdir@/data/vec_hashjoin1_data1.txt' delimiter as ' ';
|
||||
copy ROW_HASHJOIN_TABLE_05 from '/usr3/data1/jiangyan/openGauss-server/src/test/regress/data/vec_hashjoin1_data1.txt' delimiter as ' ';
|
||||
--insert into ROW_HASHJOIN_TABLE_06 select generate_series(5000,6000,1), generate_series(5000,6000,1), 'row'|| generate_series(1,1001);
|
||||
copy ROW_HASHJOIN_TABLE_06 from '@abs_srcdir@/data/vec_hashjoin1_data2.txt' delimiter as ' ';
|
||||
copy ROW_HASHJOIN_TABLE_06 from '/usr3/data1/jiangyan/openGauss-server/src/test/regress/data/vec_hashjoin1_data2.txt' delimiter as ' ';
|
||||
\parallel off
|
||||
\parallel on 8
|
||||
INSERT INTO vector_hashjoin_engine.VECTOR_HASHJOIN_TABLE_01 SELECT * FROM vector_hashjoin_engine.ROW_HASHJOIN_TABLE_01;
|
||||
@ -294,33 +294,23 @@ set enable_mergejoin=off;
|
||||
--- case 1: HashJoin Inner Join
|
||||
----
|
||||
explain (verbose on, costs off) SELECT A.C_INT, A.C_BIGINT, A.C_VARCHAR_3, A.C_DATE FROM VECTOR_HASHJOIN_TABLE_01 A INNER JOIN VECTOR_HASHJOIN_TABLE_02 B ON A.C_INT = B.C_INT WHERE A.C_INT <8 AND A.C_BIGINT<9 ORDER BY 1, 2;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: a.c_int, a.c_bigint, a.c_varchar_3, a.c_date
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> Vector Sort
|
||||
Output: a.c_int, a.c_bigint, a.c_varchar_3, a.c_date
|
||||
Merge Sort Key: a.c_int, a.c_bigint
|
||||
Node/s: All datanodes
|
||||
-> Vector Sort
|
||||
Sort Key: a.c_int, a.c_bigint
|
||||
-> Vector Sonic Hash Join
|
||||
Output: a.c_int, a.c_bigint, a.c_varchar_3, a.c_date
|
||||
Sort Key: a.c_int, a.c_bigint
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (a.c_int = b.c_int)
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_01 a
|
||||
Output: a.c_int, a.c_bigint, a.c_varchar_3, a.c_date
|
||||
Hash Cond: (a.c_int = b.c_int)
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_01 a
|
||||
Output: a.c_int, a.c_bigint, a.c_varchar_3, a.c_date
|
||||
Distribute Key: a.c_char_1
|
||||
Filter: ((a.c_int < 8) AND (a.c_bigint < 9))
|
||||
-> Vector Streaming(type: BROADCAST)
|
||||
Output: b.c_int
|
||||
Spawn on: All datanodes
|
||||
Consumer Nodes: All datanodes
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_02 b
|
||||
Output: b.c_int
|
||||
Distribute Key: b.c_int
|
||||
Filter: (b.c_int < 8)
|
||||
(24 rows)
|
||||
Filter: ((a.c_int < 8) AND (a.c_bigint < 9))
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_02 b
|
||||
Output: b.c_int
|
||||
Filter: (b.c_int < 8)
|
||||
(14 rows)
|
||||
|
||||
SELECT A.C_INT, A.C_BIGINT, A.C_VARCHAR_3, A.C_DATE FROM VECTOR_HASHJOIN_TABLE_01 A INNER JOIN VECTOR_HASHJOIN_TABLE_02 B ON A.C_INT = B.C_INT WHERE A.C_INT <10 AND A.C_BIGINT<5 ORDER BY 1, 2;
|
||||
c_int | c_bigint | c_varchar_3 | c_date
|
||||
@ -658,33 +648,22 @@ SELECT count(*) from VECTOR_HASHJOIN_TABLE_03 A inner join VECTOR_HASHJOIN_TABLE
|
||||
--- case 2: HashJoin Left/Right Join
|
||||
----
|
||||
explain (verbose on, costs off) SELECT A.C_INT,A.C_BIGINT,A.C_VARCHAR_3,A.C_DATE FROM VECTOR_HASHJOIN_TABLE_01 A LEFT JOIN VECTOR_HASHJOIN_TABLE_02 B ON A.C_INT = B.C_INT WHERE A.C_INT >45 AND A.C_BIGINT>28 ORDER BY 1, 2;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: a.c_int, a.c_bigint, a.c_varchar_3, a.c_date
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> Vector Sort
|
||||
Output: a.c_int, a.c_bigint, a.c_varchar_3, a.c_date
|
||||
Merge Sort Key: a.c_int, a.c_bigint
|
||||
Node/s: All datanodes
|
||||
-> Vector Sort
|
||||
Sort Key: a.c_int, a.c_bigint
|
||||
-> Vector Hash Right Join
|
||||
Output: a.c_int, a.c_bigint, a.c_varchar_3, a.c_date
|
||||
Sort Key: a.c_int, a.c_bigint
|
||||
-> Vector Hash Left Join
|
||||
Hash Cond: (b.c_int = a.c_int)
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_02 b
|
||||
Output: b.c_int
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_01 a
|
||||
Output: a.c_int, a.c_bigint, a.c_varchar_3, a.c_date
|
||||
Hash Cond: (a.c_int = b.c_int)
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
Output: a.c_int, a.c_bigint, a.c_varchar_3, a.c_date
|
||||
Distribute Key: a.c_int
|
||||
Spawn on: All datanodes
|
||||
Consumer Nodes: All datanodes
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_01 a
|
||||
Output: a.c_int, a.c_bigint, a.c_varchar_3, a.c_date
|
||||
Distribute Key: a.c_char_1
|
||||
Filter: ((a.c_int > 45) AND (a.c_bigint > 28))
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_02 b
|
||||
Output: b.c_int
|
||||
Distribute Key: b.c_int
|
||||
(24 rows)
|
||||
Filter: ((a.c_int > 45) AND (a.c_bigint > 28))
|
||||
(13 rows)
|
||||
|
||||
SELECT A.C_INT,A.C_BIGINT,A.C_VARCHAR_3,A.C_DATE FROM VECTOR_HASHJOIN_TABLE_01 A LEFT JOIN VECTOR_HASHJOIN_TABLE_02 B ON A.C_INT = B.C_INT WHERE A.C_INT >10 AND A.C_BIGINT>5 ORDER BY 1, 2;
|
||||
c_int | c_bigint | c_varchar_3 | c_date
|
||||
@ -1193,31 +1172,23 @@ SELECT A.C_INT,A.C_BIGINT,A.C_VARCHAR_3,A.C_DATE FROM VECTOR_HASHJOIN_TABLE_01 A
|
||||
|
||||
--SELECT A.C_INT,A.C_BIGINT,A.C_VARCHAR_3,A.C_DATE FROM VECTOR_HASHJOIN_TABLE_01 A LEFT JOIN VECTOR_HASHJOIN_TABLE_02 B ON A.C_INT = B.C_INT WHERE A.C_INT <10 AND A.C_BIGINT>5 ORDER BY 1, 2;
|
||||
explain (verbose on, costs off) SELECT A.C_INT,A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_01 A LEFT JOIN VECTOR_HASHJOIN_TABLE_02 B ON A.C_INT = B.C_INT and A.C_BIGINT > 1000 WHERE A.C_INT <4 ORDER BY 1, 2;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: a.c_int, a.c_bigint
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> Vector Sort
|
||||
Output: a.c_int, a.c_bigint
|
||||
Merge Sort Key: a.c_int, a.c_bigint
|
||||
-> Vector Sort
|
||||
Sort Key: a.c_int, a.c_bigint
|
||||
-> Vector Hash Right Join
|
||||
Output: a.c_int, a.c_bigint
|
||||
Sort Key: a.c_int, a.c_bigint
|
||||
-> Vector Hash Left Join
|
||||
Hash Cond: (b.c_int = a.c_int)
|
||||
Join Filter: (a.c_bigint > 1000)
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_02 b
|
||||
Output: b.c_int
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_01 a
|
||||
Output: a.c_int, a.c_bigint
|
||||
Hash Cond: (a.c_int = b.c_int)
|
||||
Join Filter: (a.c_bigint > 1000)
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
Output: a.c_int, a.c_bigint
|
||||
Distribute Key: a.c_int
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_01 a
|
||||
Output: a.c_int, a.c_bigint
|
||||
Distribute Key: a.c_char_1
|
||||
Filter: (a.c_int < 4)
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_02 b
|
||||
Output: b.c_int
|
||||
Distribute Key: b.c_int
|
||||
(22 rows)
|
||||
Filter: (a.c_int < 4)
|
||||
(14 rows)
|
||||
|
||||
SELECT A.C_INT,A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_01 A LEFT JOIN VECTOR_HASHJOIN_TABLE_02 B ON A.C_INT = B.C_INT and A.C_BIGINT > 1000 WHERE A.C_INT <4 ORDER BY 1, 2;
|
||||
c_int | c_bigint
|
||||
@ -1355,33 +1326,22 @@ SELECT B.C_INT, A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_04 B RIGHT JOIN VECTOR_HA
|
||||
--- case 3: HashJoin Anti Join
|
||||
----
|
||||
explain (verbose on, costs off) SELECT B.C_INT , A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_04 B RIGHT JOIN VECTOR_HASHJOIN_TABLE_03 A ON A.C_INT = B.C_INT AND A.C_BIGINT<2 where B.C_INT is NULL order by 1,2;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: b.c_int, a.c_bigint
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> Vector Sort
|
||||
Output: b.c_int, a.c_bigint
|
||||
Merge Sort Key: b.c_int, a.c_bigint
|
||||
-> Vector Sort
|
||||
Sort Key: b.c_int, a.c_bigint
|
||||
-> Vector Hash Anti Join
|
||||
Output: b.c_int, a.c_bigint
|
||||
Sort Key: b.c_int, a.c_bigint
|
||||
-> Vector Hash Anti Join
|
||||
Output: b.c_int, a.c_bigint
|
||||
Hash Cond: (a.c_int = b.c_int)
|
||||
Join Filter: (a.c_bigint < 2)
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
Output: a.c_bigint, a.c_int
|
||||
Distribute Key: a.c_int
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_03 a
|
||||
Output: a.c_bigint, a.c_int
|
||||
Distribute Key: a.c_char_1
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
Output: b.c_int
|
||||
Distribute Key: b.c_int
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_04 b
|
||||
Output: b.c_int
|
||||
Distribute Key: b.c_char_1
|
||||
(24 rows)
|
||||
Hash Cond: (a.c_int = b.c_int)
|
||||
Join Filter: (a.c_bigint < 2)
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_03 a
|
||||
Output: a.c_bigint, a.c_int
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_04 b
|
||||
Output: b.c_int
|
||||
(13 rows)
|
||||
|
||||
SELECT B.C_INT , A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_04 B RIGHT JOIN VECTOR_HASHJOIN_TABLE_03 A ON A.C_INT = B.C_INT AND A.C_BIGINT<2 where B.C_INT is NULL order by 1,2;
|
||||
c_int | c_bigint
|
||||
@ -1429,32 +1389,21 @@ SELECT B.C_INT , A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_04 B RIGHT JOIN VECTOR_
|
||||
(40 rows)
|
||||
|
||||
explain (verbose on, costs off) SELECT B.C_INT, A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_04 B RIGHT JOIN VECTOR_HASHJOIN_TABLE_03 A ON A.C_INT = B.C_INT where B.C_INT is NULL order by 1,2;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: b.c_int, a.c_bigint
|
||||
-> Vector Streaming (type: GATHER)
|
||||
-> Vector Sort
|
||||
Output: b.c_int, a.c_bigint
|
||||
Merge Sort Key: b.c_int, a.c_bigint
|
||||
-> Vector Sort
|
||||
Sort Key: b.c_int, a.c_bigint
|
||||
-> Vector Hash Anti Join
|
||||
Output: b.c_int, a.c_bigint
|
||||
Sort Key: b.c_int, a.c_bigint
|
||||
-> Vector Hash Anti Join
|
||||
Output: b.c_int, a.c_bigint
|
||||
Hash Cond: (a.c_int = b.c_int)
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
Output: a.c_bigint, a.c_int
|
||||
Distribute Key: a.c_int
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_03 a
|
||||
Output: a.c_bigint, a.c_int
|
||||
Distribute Key: a.c_char_1
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
Output: b.c_int
|
||||
Distribute Key: b.c_int
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_04 b
|
||||
Output: b.c_int
|
||||
Distribute Key: b.c_char_1
|
||||
(23 rows)
|
||||
Hash Cond: (a.c_int = b.c_int)
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_03 a
|
||||
Output: a.c_bigint, a.c_int
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_04 b
|
||||
Output: b.c_int
|
||||
(12 rows)
|
||||
|
||||
SELECT B.C_INT, A.C_BIGINT FROM VECTOR_HASHJOIN_TABLE_04 B RIGHT JOIN VECTOR_HASHJOIN_TABLE_03 A ON A.C_INT = B.C_INT where B.C_INT is NULL order by 1,2;
|
||||
c_int | c_bigint
|
||||
@ -8017,27 +7966,20 @@ reset work_mem;
|
||||
--- case : test innerjoin codegen with fast path
|
||||
----
|
||||
explain (verbose on, costs off) select count(*) from VECTOR_HASHJOIN_TABLE_13 A inner join VECTOR_HASHJOIN_TABLE_14 B on A.c1 = B.c1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
------------------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
Output: (pg_catalog.count(*))
|
||||
Output: (count(*))
|
||||
-> Vector Aggregate
|
||||
Output: pg_catalog.count(*)
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Output: (count(*))
|
||||
Node/s: All datanodes
|
||||
-> Vector Aggregate
|
||||
Output: count(*)
|
||||
-> Vector Sonic Hash Join
|
||||
Output: 'Dummy'
|
||||
Hash Cond: (b.c1 = a.c1)
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_14 b
|
||||
Output: b.c1
|
||||
Distribute Key: b.c1
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_13 a
|
||||
Output: a.c1
|
||||
Distribute Key: a.c1
|
||||
(18 rows)
|
||||
Output: count(*)
|
||||
-> Vector Sonic Hash Join
|
||||
Output: 'Dummy'
|
||||
Hash Cond: (b.c1 = a.c1)
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_14 b
|
||||
Output: b.c1
|
||||
-> CStore Scan on vector_hashjoin_engine.vector_hashjoin_table_13 a
|
||||
Output: a.c1
|
||||
(11 rows)
|
||||
|
||||
select count(*) from VECTOR_HASHJOIN_TABLE_13 A inner join VECTOR_HASHJOIN_TABLE_14 B on A.c1 = B.c1;
|
||||
count
|
||||
@ -8073,22 +8015,17 @@ set enable_nestloop=off;
|
||||
set query_dop=1;
|
||||
explain (costs off)
|
||||
select 2/(coalesce(t1.c2,0)+ coalesce(t2.c1,0)) from t1, t2 where t1.c1 = t2.c2 and (coalesce(t2.c1, 0) + coalesce(t1.c2, 0))> 0 order by 1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: ((2 / (COALESCE(t1.c2, 0) + COALESCE(t2.c1, 0))))
|
||||
Node/s: All datanodes
|
||||
-> Vector Sort
|
||||
Sort Key: ((2 / (COALESCE(t1.c2, 0) + COALESCE(t2.c1, 0))))
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (t2.c2 = t1.c1)
|
||||
Join Filter: ((COALESCE(t2.c1, 0) + COALESCE(t1.c2, 0)) > 0)
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
Spawn on: All datanodes
|
||||
-> CStore Scan on t2
|
||||
-> CStore Scan on t1
|
||||
(13 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: ((2 / (COALESCE(t1.c2, 0) + COALESCE(t2.c1, 0))))
|
||||
-> Vector Sonic Hash Join
|
||||
Hash Cond: (t1.c1 = t2.c2)
|
||||
Join Filter: ((COALESCE(t2.c1, 0) + COALESCE(t1.c2, 0)) > 0)
|
||||
-> CStore Scan on t1
|
||||
-> CStore Scan on t2
|
||||
(8 rows)
|
||||
|
||||
select 2/(coalesce(t1.c2,0)+ coalesce(t2.c1,0)) from t1, t2 where t1.c1 = t2.c2 and (coalesce(t2.c1, 0) + coalesce(t1.c2, 0))> 0 order by 1;
|
||||
?column?
|
||||
@ -8104,22 +8041,17 @@ set enable_nestloop=off;
|
||||
set query_dop=1;
|
||||
explain (costs off)
|
||||
select 2/(coalesce(t1.c2,0)+ coalesce(t2.c1,0)) from t1, t2 where t1.c1 = t2.c2 and (coalesce(t2.c1, 0) + coalesce(t1.c2, 0))> 0 order by 1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: ((2 / (COALESCE(t1.c2, 0) + COALESCE(t2.c1, 0))))
|
||||
Node/s: All datanodes
|
||||
-> Vector Sort
|
||||
Sort Key: ((2 / (COALESCE(t1.c2, 0) + COALESCE(t2.c1, 0))))
|
||||
-> Vector Hash Join
|
||||
Hash Cond: (t2.c2 = t1.c1)
|
||||
Join Filter: ((COALESCE(t2.c1, 0) + COALESCE(t1.c2, 0)) > 0)
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
Spawn on: All datanodes
|
||||
-> CStore Scan on t2
|
||||
-> CStore Scan on t1
|
||||
(13 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: ((2 / (COALESCE(t1.c2, 0) + COALESCE(t2.c1, 0))))
|
||||
-> Vector Hash Join
|
||||
Hash Cond: (t1.c1 = t2.c2)
|
||||
Join Filter: ((COALESCE(t2.c1, 0) + COALESCE(t1.c2, 0)) > 0)
|
||||
-> CStore Scan on t1
|
||||
-> CStore Scan on t2
|
||||
(8 rows)
|
||||
|
||||
select 2/(coalesce(t1.c2,0)+ coalesce(t2.c1,0)) from t1, t2 where t1.c1 = t2.c2 and (coalesce(t2.c1, 0) + coalesce(t1.c2, 0))> 0 order by 1;
|
||||
?column?
|
||||
@ -8134,26 +8066,21 @@ set enable_nestloop=off;
|
||||
set query_dop=1;
|
||||
explain (costs off)
|
||||
select 2/(coalesce(t1.c2,0)+ coalesce(t2.c1,0)) from t1, t2 where t1.c1 = t2.c2 and (coalesce(t2.c1, 0) + coalesce(t1.c2, 0))> 0 order by 1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------------
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------------
|
||||
Row Adapter
|
||||
-> Vector Streaming (type: GATHER)
|
||||
Merge Sort Key: ((2 / (COALESCE(t1.c2, 0) + COALESCE(t2.c1, 0))))
|
||||
Node/s: All datanodes
|
||||
-> Vector Sort
|
||||
Sort Key: ((2 / (COALESCE(t1.c2, 0) + COALESCE(t2.c1, 0))))
|
||||
-> Vector Merge Join
|
||||
Merge Cond: (t1.c1 = t2.c2)
|
||||
Join Filter: ((COALESCE(t2.c1, 0) + COALESCE(t1.c2, 0)) > 0)
|
||||
-> Vector Sort
|
||||
Sort Key: t1.c1
|
||||
-> CStore Scan on t1
|
||||
-> Vector Sort
|
||||
Sort Key: t2.c2
|
||||
-> Vector Streaming(type: REDISTRIBUTE)
|
||||
Spawn on: All datanodes
|
||||
-> CStore Scan on t2
|
||||
(17 rows)
|
||||
-> Vector Sort
|
||||
Sort Key: ((2 / (COALESCE(t1.c2, 0) + COALESCE(t2.c1, 0))))
|
||||
-> Vector Merge Join
|
||||
Merge Cond: (t1.c1 = t2.c2)
|
||||
Join Filter: ((COALESCE(t2.c1, 0) + COALESCE(t1.c2, 0)) > 0)
|
||||
-> Vector Sort
|
||||
Sort Key: t1.c1
|
||||
-> CStore Scan on t1
|
||||
-> Vector Sort
|
||||
Sort Key: t2.c2
|
||||
-> CStore Scan on t2
|
||||
(12 rows)
|
||||
|
||||
select 2/(coalesce(t1.c2,0)+ coalesce(t2.c1,0)) from t1, t2 where t1.c1 = t2.c2 and (coalesce(t2.c1, 0) + coalesce(t1.c2, 0))> 0 order by 1;
|
||||
?column?
|
||||
|
||||
@ -303,7 +303,7 @@ SET ENABLE_MERGEJOIN = ON;
|
||||
SET ENABLE_NESTLOOP = OFF;
|
||||
SET ENABLE_HASHJOIN = OFF;
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT partition_heap_test_t1.*, partition_heap_test_t2.B FROM partition_heap_test_t1 INNER JOIN partition_heap_test_t2 ON (partition_heap_test_t1.A = partition_heap_test_t2.A) ORDER BY 1,2,3;
|
||||
EXPLAIN (COSTS OFF) SELECT partition_heap_test_t1.*, partition_heap_test_t2.B FROM partition_heap_test_t1 INNER JOIN partition_heap_test_t2 ON (partition_heap_test_t1.A = partition_heap_test_t2.A) ORDER BY 1,2,3;
|
||||
SELECT partition_heap_test_t1.*, partition_heap_test_t2.B FROM partition_heap_test_t1 INNER JOIN partition_heap_test_t2 ON (partition_heap_test_t1.A = partition_heap_test_t2.A) order by 1, 2, 3 limit 10;
|
||||
|
||||
drop table partition_heap_test_t1;
|
||||
@ -336,7 +336,7 @@ SET ENABLE_MERGEJOIN = ON;
|
||||
SET ENABLE_NESTLOOP = OFF;
|
||||
SET ENABLE_HASHJOIN = OFF;
|
||||
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT partition_heap_test_t1.*, partition_heap_test_t2.B FROM partition_heap_test_t1 INNER JOIN partition_heap_test_t2 ON (partition_heap_test_t1.A = partition_heap_test_t2.A) ORDER BY 1,2,3;
|
||||
EXPLAIN (COSTS OFF) SELECT partition_heap_test_t1.*, partition_heap_test_t2.B FROM partition_heap_test_t1 INNER JOIN partition_heap_test_t2 ON (partition_heap_test_t1.A = partition_heap_test_t2.A) ORDER BY 1,2,3;
|
||||
SELECT partition_heap_test_t1.*, partition_heap_test_t2.B FROM partition_heap_test_t1 INNER JOIN partition_heap_test_t2 ON (partition_heap_test_t1.A = partition_heap_test_t2.A) order by 1, 2, 3;
|
||||
|
||||
drop table partition_heap_test_t1;
|
||||
|
||||
@ -52,19 +52,19 @@ SET enable_mergejoin = OFF;
|
||||
SET enable_hashjoin = OFF;
|
||||
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
-- rsult of cross join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04 order by 1, 2;
|
||||
-- rsult of inner joi
|
||||
@ -95,19 +95,19 @@ SET enable_mergejoin = OFF;
|
||||
SET enable_hashjoin = OFF;
|
||||
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
-- rsult of cross join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04 order by 1, 2;
|
||||
-- rsult of inner joi
|
||||
@ -138,19 +138,19 @@ SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = OFF;
|
||||
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
-- rsult of cross join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04 order by 1, 2;
|
||||
-- rsult of inner joi
|
||||
@ -183,19 +183,19 @@ SET enable_hashjoin = OFF;
|
||||
--
|
||||
---- explain cross join
|
||||
--
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
-- rsult of cross join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04 order by 1, 2;
|
||||
-- rsult of inner joi
|
||||
@ -226,19 +226,19 @@ SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = OFF;
|
||||
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
-- rsult of cross join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04 order by 1, 2;
|
||||
-- rsult of inner joi
|
||||
@ -269,19 +269,19 @@ SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = OFF;
|
||||
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
-- rsult of cross join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04 order by 1, 2;
|
||||
-- rsult of inner joi
|
||||
@ -312,19 +312,19 @@ SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = OFF;
|
||||
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
-- rsult of cross join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04 order by 1, 2;
|
||||
-- rsult of inner joi
|
||||
@ -355,19 +355,19 @@ SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = ON;
|
||||
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
-- rsult of cross join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04 order by 1, 2;
|
||||
-- rsult of inner joi
|
||||
@ -400,19 +400,19 @@ SET enable_hashjoin = ON;
|
||||
--
|
||||
---- explain cross join
|
||||
--
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
-- rsult of cross join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04 order by 1, 2;
|
||||
-- rsult of inner joi
|
||||
@ -424,9 +424,9 @@ SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_sca
|
||||
-- rsult of FULL join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
-- result of no partition to join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
@ -447,19 +447,19 @@ SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = ON;
|
||||
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
-- rsult of cross join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04 order by 1, 2;
|
||||
-- rsult of inner joi
|
||||
@ -471,9 +471,9 @@ SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_sca
|
||||
-- rsult of FULL join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
-- result of no partition to join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
@ -494,19 +494,19 @@ SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = ON;
|
||||
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
-- rsult of cross join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04 order by 1, 2;
|
||||
-- rsult of inner joi
|
||||
@ -518,9 +518,9 @@ SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_sca
|
||||
-- rsult of FULL join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
-- result of no partition to join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
@ -541,19 +541,19 @@ SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = ON;
|
||||
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
-- rsult of cross join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04 order by 1, 2;
|
||||
-- rsult of inner joi
|
||||
@ -584,19 +584,19 @@ SET enable_mergejoin = ON;
|
||||
SET enable_hashjoin = ON;
|
||||
|
||||
-- explain cross join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04;
|
||||
-- explain inner join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 INNER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain left outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain right outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 RIGHT OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain full outer join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 FULL OUTER JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) ORDER BY heap_tbl_scan_test_03.SN, heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_03.NAME;
|
||||
-- explain for no partition to join
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF, NODES OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_03.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40;
|
||||
EXPLAIN (COSTS OFF) SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 LEFT JOIN heap_tbl_scan_test_04 ON (heap_tbl_scan_test_03.SN = heap_tbl_scan_test_04.SN) WHERE heap_tbl_scan_test_04.SN > 40 AND heap_tbl_scan_test_03.SN > 40;
|
||||
-- rsult of cross join
|
||||
SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_scan_test_03 CROSS JOIN heap_tbl_scan_test_04 order by 1, 2;
|
||||
-- rsult of inner joi
|
||||
@ -615,3 +615,4 @@ SELECT heap_tbl_scan_test_03.NAME, heap_tbl_scan_test_04.PHONE FROM heap_tbl_sca
|
||||
-- clean up
|
||||
DROP TABLE heap_tbl_scan_test_03;
|
||||
DROP TABLE heap_tbl_scan_test_04;
|
||||
|
||||
|
||||
@ -6,8 +6,8 @@ set current_schema = col_distribute_subplan_base;
|
||||
-- Create Table and Insert Data
|
||||
create table t_subplan1(a1 int, b1 int, c1 int, d1 int) with (orientation = column) ;
|
||||
create table t_subplan2(a2 int, b2 int, c2 int, d2 int) with (orientation = column) ;
|
||||
insert into t_subplan1 select generate_series(1, 100)%98, generate_series(1, 100)%20, generate_series(1, 100)%13, generate_series(1, 100)%6 from public.src;
|
||||
insert into t_subplan2 select generate_series(1, 50)%48, generate_series(1, 50)%28, generate_series(1, 50)%12, generate_series(1, 50)%9 from public.src;
|
||||
insert into t_subplan1 select generate_series(1, 100)%98, generate_series(1, 100)%20, generate_series(1, 100)%13, generate_series(1, 100)%6;
|
||||
insert into t_subplan2 select generate_series(1, 50)%48, generate_series(1, 50)%28, generate_series(1, 50)%12, generate_series(1, 50)%9;
|
||||
|
||||
-- 1. initplan
|
||||
explain (costs off)
|
||||
|
||||
@ -6,8 +6,8 @@ set current_schema = col_distribute_subplan_base_2;
|
||||
-- Create Table and Insert Data
|
||||
create table t_subplan1(a1 int, b1 int, c1 int, d1 int) with (orientation = column) ;
|
||||
create table t_subplan2(a2 int, b2 int, c2 int, d2 int) with (orientation = column) ;
|
||||
insert into t_subplan1 select generate_series(1, 100)%98, generate_series(1, 100)%20, generate_series(1, 100)%13, generate_series(1, 100)%6 from public.src;
|
||||
insert into t_subplan2 select generate_series(1, 50)%48, generate_series(1, 50)%28, generate_series(1, 50)%12, generate_series(1, 50)%9 from public.src;
|
||||
insert into t_subplan1 select generate_series(1, 100)%98, generate_series(1, 100)%20, generate_series(1, 100)%13, generate_series(1, 100)%6;
|
||||
insert into t_subplan2 select generate_series(1, 50)%48, generate_series(1, 50)%28, generate_series(1, 50)%12, generate_series(1, 50)%9;
|
||||
|
||||
create table t_subplan5 with (orientation = column) as select * from t_subplan1;
|
||||
create table t_subplan6 with (orientation = column) as select * from t_subplan2;
|
||||
@ -152,9 +152,6 @@ explain (costs off, verbose on)
|
||||
select (with cte(foo) as (select a1) select foo from cte) from t_subplan1 order by 1 limit 3;
|
||||
select (with cte(foo) as (select a1) select foo from cte) from t_subplan1 order by 1 limit 3;
|
||||
explain (costs off, verbose on)
|
||||
select (with cte(foo) as (select a1 from dual) select foo from cte) from t_subplan1 order by 1 limit 3;
|
||||
select (with cte(foo) as (select a1 from dual) select foo from cte) from t_subplan1 order by 1 limit 3;
|
||||
explain (costs off, verbose on)
|
||||
select (with cte(foo) as (values(b1)) values((select foo from cte))) from t_subplan1 order by 1 limit 3;
|
||||
select (with cte(foo) as (values(b1)) values((select foo from cte))) from t_subplan1 order by 1 limit 3;
|
||||
explain (costs off, verbose on)
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
--
|
||||
-- Enforce use of COMMIT instead of 2PC for temporary objects
|
||||
|
||||
CREATE TEMP TABLE combocidtest (foobar int) distribute by replication;
|
||||
CREATE TEMP TABLE combocidtest (foobar int);
|
||||
|
||||
START TRANSACTION;
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ SET enable_seqscan = OFF;
|
||||
SET enable_indexscan = ON;
|
||||
SET enable_bitmapscan = OFF;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT * FROM fast_emp4000
|
||||
WHERE home_base @ '(200,200),(2000,1000)'::box
|
||||
ORDER BY (home_base[0])[0];
|
||||
@ -92,83 +92,83 @@ SELECT * FROM fast_emp4000
|
||||
WHERE home_base @ '(200,200),(2000,1000)'::box
|
||||
ORDER BY (home_base[0])[0];
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM fast_emp4000 WHERE home_base && '(1000,1000,0,0)'::box;
|
||||
SELECT count(*) FROM fast_emp4000 WHERE home_base && '(1000,1000,0,0)'::box;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL;
|
||||
SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT * FROM polygon_tbl WHERE f1 ~ '((1,1),(2,2),(2,1))'::polygon
|
||||
ORDER BY (poly_center(f1))[0];
|
||||
SELECT * FROM polygon_tbl WHERE f1 ~ '((1,1),(2,2),(2,1))'::polygon
|
||||
ORDER BY (poly_center(f1))[0];
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1)
|
||||
ORDER BY area(f1);
|
||||
SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1)
|
||||
ORDER BY area(f1);
|
||||
|
||||
--EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
--EXPLAIN(COSTS OFF)
|
||||
--SELECT count(*) FROM gpolygon_tbl WHERE f1 && '(1000,1000,0,0)'::polygon;
|
||||
--SELECT count(*) FROM gpolygon_tbl WHERE f1 && '(1000,1000,0,0)'::polygon;
|
||||
|
||||
--EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
--EXPLAIN(COSTS OFF)
|
||||
--SELECT count(*) FROM gcircle_tbl WHERE f1 && '<(500,500),500>'::circle;
|
||||
--SELECT count(*) FROM gcircle_tbl WHERE f1 && '<(500,500),500>'::circle;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl WHERE f1 <@ box '(0,0,100,100)';
|
||||
SELECT count(*) FROM point_tbl WHERE f1 <@ box '(0,0,100,100)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl WHERE box '(0,0,100,100)' @> f1;
|
||||
SELECT count(*) FROM point_tbl WHERE box '(0,0,100,100)' @> f1;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl WHERE f1 <@ polygon '(0,0),(0,100),(100,100),(50,50),(100,0),(0,0)';
|
||||
SELECT count(*) FROM point_tbl WHERE f1 <@ polygon '(0,0),(0,100),(100,100),(50,50),(100,0),(0,0)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl WHERE f1 <@ circle '<(50,50),50>';
|
||||
SELECT count(*) FROM point_tbl WHERE f1 <@ circle '<(50,50),50>';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 << '(0.0, 0.0)';
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 << '(0.0, 0.0)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 >> '(0.0, 0.0)';
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 >> '(0.0, 0.0)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 <^ '(0.0, 0.0)';
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 <^ '(0.0, 0.0)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 >^ '(0.0, 0.0)';
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 >^ '(0.0, 0.0)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 ~= '(-5, -12)';
|
||||
SELECT count(*) FROM point_tbl p WHERE p.f1 ~= '(-5, -12)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT * FROM point_tbl ORDER BY f1 <-> '0,1';
|
||||
SELECT * FROM point_tbl ORDER BY f1 <-> '0,1';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT * FROM point_tbl WHERE f1 IS NULL;
|
||||
SELECT * FROM point_tbl WHERE f1 IS NULL;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT * FROM point_tbl WHERE f1 IS NOT NULL ORDER BY f1 <-> '0,1';
|
||||
SELECT * FROM point_tbl WHERE f1 IS NOT NULL ORDER BY f1 <-> '0,1';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT * FROM point_tbl WHERE f1 <@ '(-10,-10),(10,10)':: box ORDER BY f1 <-> '0,1';
|
||||
SELECT * FROM point_tbl WHERE f1 <@ '(-10,-10),(10,10)':: box ORDER BY f1 <-> '0,1';
|
||||
|
||||
@ -177,7 +177,7 @@ SET enable_seqscan = OFF;
|
||||
SET enable_indexscan = OFF;
|
||||
SET enable_bitmapscan = ON;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT * FROM point_tbl WHERE f1 <@ '(-10,-10),(10,10)':: box ORDER BY f1 <-> '0,1';
|
||||
SELECT * FROM point_tbl WHERE f1 <@ '(-10,-10),(10,10)':: box ORDER BY f1 <-> '0,1';
|
||||
|
||||
@ -188,4 +188,4 @@ create index i on t using gist(c_point) with (buffering=on);
|
||||
|
||||
RESET enable_seqscan;
|
||||
RESET enable_indexscan;
|
||||
RESET enable_bitmapscan;
|
||||
RESET enable_bitmapscan;
|
||||
|
||||
@ -88,123 +88,123 @@ SET enable_seqscan = OFF;
|
||||
SET enable_indexscan = ON;
|
||||
SET enable_bitmapscan = OFF;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p IS NULL;
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p IS NULL;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p IS NOT NULL;
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p IS NOT NULL;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl;
|
||||
SELECT count(*) FROM quad_point_tbl;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p <@ box '(200,200,1000,1000)';
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p <@ box '(200,200,1000,1000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE box '(200,200,1000,1000)' @> p;
|
||||
SELECT count(*) FROM quad_point_tbl WHERE box '(200,200,1000,1000)' @> p;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p << '(5000, 4000)';
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p << '(5000, 4000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p >> '(5000, 4000)';
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p >> '(5000, 4000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p <^ '(5000, 4000)';
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p <^ '(5000, 4000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p >^ '(5000, 4000)';
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p >^ '(5000, 4000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p ~= '(4585, 365)';
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p ~= '(4585, 365)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p <@ box '(200,200,1000,1000)';
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p <@ box '(200,200,1000,1000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM kd_point_tbl WHERE box '(200,200,1000,1000)' @> p;
|
||||
SELECT count(*) FROM kd_point_tbl WHERE box '(200,200,1000,1000)' @> p;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p << '(5000, 4000)';
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p << '(5000, 4000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p >> '(5000, 4000)';
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p >> '(5000, 4000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p <^ '(5000, 4000)';
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p <^ '(5000, 4000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p >^ '(5000, 4000)';
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p >^ '(5000, 4000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p ~= '(4585, 365)';
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p ~= '(4585, 365)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'P0123456789abcdef';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'P0123456789abcdef';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'P0123456789abcde';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'P0123456789abcde';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'P0123456789abcdefF';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'P0123456789abcdefF';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t < 'Aztec Ct ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t < 'Aztec Ct ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t ~<~ 'Aztec Ct ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t ~<~ 'Aztec Ct ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t <= 'Aztec Ct ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t <= 'Aztec Ct ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t ~<=~ 'Aztec Ct ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t ~<=~ 'Aztec Ct ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'Aztec Ct ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'Aztec Ct ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'Worth St ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'Worth St ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t >= 'Worth St ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t >= 'Worth St ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t ~>=~ 'Worth St ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t ~>=~ 'Worth St ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t > 'Worth St ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t > 'Worth St ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t ~>~ 'Worth St ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t ~>~ 'Worth St ';
|
||||
|
||||
@ -213,126 +213,126 @@ SET enable_seqscan = OFF;
|
||||
SET enable_indexscan = OFF;
|
||||
SET enable_bitmapscan = ON;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p IS NULL;
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p IS NULL;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p IS NOT NULL;
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p IS NOT NULL;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl;
|
||||
SELECT count(*) FROM quad_point_tbl;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p <@ box '(200,200,1000,1000)';
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p <@ box '(200,200,1000,1000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE box '(200,200,1000,1000)' @> p;
|
||||
SELECT count(*) FROM quad_point_tbl WHERE box '(200,200,1000,1000)' @> p;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p << '(5000, 4000)';
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p << '(5000, 4000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p >> '(5000, 4000)';
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p >> '(5000, 4000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p <^ '(5000, 4000)';
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p <^ '(5000, 4000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p >^ '(5000, 4000)';
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p >^ '(5000, 4000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p ~= '(4585, 365)';
|
||||
SELECT count(*) FROM quad_point_tbl WHERE p ~= '(4585, 365)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p <@ box '(200,200,1000,1000)';
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p <@ box '(200,200,1000,1000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM kd_point_tbl WHERE box '(200,200,1000,1000)' @> p;
|
||||
SELECT count(*) FROM kd_point_tbl WHERE box '(200,200,1000,1000)' @> p;
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p << '(5000, 4000)';
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p << '(5000, 4000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p >> '(5000, 4000)';
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p >> '(5000, 4000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p <^ '(5000, 4000)';
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p <^ '(5000, 4000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p >^ '(5000, 4000)';
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p >^ '(5000, 4000)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p ~= '(4585, 365)';
|
||||
SELECT count(*) FROM kd_point_tbl WHERE p ~= '(4585, 365)';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'P0123456789abcdef';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'P0123456789abcdef';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'P0123456789abcde';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'P0123456789abcde';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'P0123456789abcdefF';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'P0123456789abcdefF';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t < 'Aztec Ct ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t < 'Aztec Ct ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t ~<~ 'Aztec Ct ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t ~<~ 'Aztec Ct ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t <= 'Aztec Ct ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t <= 'Aztec Ct ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t ~<=~ 'Aztec Ct ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t ~<=~ 'Aztec Ct ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'Aztec Ct ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'Aztec Ct ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'Worth St ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t = 'Worth St ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t >= 'Worth St ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t >= 'Worth St ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t ~>=~ 'Worth St ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t ~>=~ 'Worth St ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t > 'Worth St ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t > 'Worth St ';
|
||||
|
||||
EXPLAIN (NUM_NODES OFF, NODES OFF, COSTS OFF)
|
||||
EXPLAIN(COSTS OFF)
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t ~>~ 'Worth St ';
|
||||
SELECT count(*) FROM suffix_text_tbl WHERE t ~>~ 'Worth St ';
|
||||
|
||||
RESET enable_seqscan;
|
||||
RESET enable_indexscan;
|
||||
RESET enable_bitmapscan;
|
||||
RESET enable_bitmapscan;
|
||||
|
||||
@ -24,8 +24,8 @@ CREATE TABLE tm_t_jhseatmain (
|
||||
seattype character varying(2),
|
||||
isdefault character varying(2)
|
||||
)
|
||||
WITH (orientation=row, compression=no)
|
||||
DISTRIBUTE BY HASH (seatid);
|
||||
WITH (orientation=row, compression=no);
|
||||
|
||||
alter table tm_t_jhseatmain REPLICA IDENTITY FULL;
|
||||
CREATE INDEX tm_t_jhseatmain_seatid_idx ON tm_t_jhseatmain USING btree (seatid) TABLESPACE pg_default;
|
||||
--
|
||||
@ -82,7 +82,6 @@ CREATE TABLE tm_t_jhseattrack (
|
||||
tasktargetid character varying(8000)
|
||||
)
|
||||
WITH (orientation=row, compression=no)
|
||||
DISTRIBUTE BY HASH (calltrackid)
|
||||
PARTITION BY RANGE (inserttimeforhis)
|
||||
(
|
||||
PARTITION p_000 VALUES LESS THAN ('2018-05-01 00:00:00') TABLESPACE pg_default,
|
||||
|
||||
@ -506,6 +506,4 @@ drop domain testdomain3;
|
||||
--
|
||||
|
||||
create domain testdomain1 as int constraint unsigned check (value > 0);
|
||||
alter domain testdomain1 rename constraint unsigned to unsigned_foo;
|
||||
alter domain testdomain1 drop constraint unsigned_foo;
|
||||
drop domain testdomain1;
|
||||
|
||||
@ -961,34 +961,3 @@ end;
|
||||
/
|
||||
select * from test;
|
||||
drop table test;
|
||||
|
||||
|
||||
CREATE OR REPLACE PROCEDURE "SP_HW_SUB_ADDMODULES"
|
||||
(
|
||||
returncode OUT integer,
|
||||
PSV_MODULEDESC IN VARCHAR2
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
END SP_HW_SUB_ADDMODULES ;
|
||||
/
|
||||
create or replace PROCEDURE sp_test
|
||||
(
|
||||
temp IN varchar2
|
||||
)
|
||||
AS
|
||||
PSV_SQL VARCHAR2(200);
|
||||
BEGIN
|
||||
PSV_SQL := 'BEGIN '
|
||||
||'SP_HW_SUB_ADDMODULES('
|
||||
||':1,'
|
||||
||''''||to_char(TEMP)||''''
|
||||
||'); END;';
|
||||
dbms_output.put_line(PSV_SQL);
|
||||
EXECUTE IMMEDIATE PSV_SQL;
|
||||
END;
|
||||
/
|
||||
call sp_test('jack');
|
||||
drop procedure SP_HW_SUB_ADDMODULES;
|
||||
drop procedure sp_test;
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,93 +1,106 @@
|
||||
create schema inlist2join_c;
|
||||
set current_schema=inlist2join_c;
|
||||
set qrw_inlist2join_optmode=1;
|
||||
create table t1(c1 int, c2 int, c3 int) with (orientation=column) distribute by hash(c1);
|
||||
insert into t1 select v,v,v from generate_series(1,12) as v;
|
||||
create table t2(c1 int, c2 int, c3 int) with (orientation=column) distribute by hash(c1);
|
||||
insert into t2 select v,v,v from generate_series(1,10) as v;
|
||||
create schema inlist2join_type_c;
|
||||
set current_schema=inlist2join_type_c;
|
||||
set qrw_inlist2join_optmode = cost_base;
|
||||
|
||||
explain (costs off) select c1,c2 from t1 where t1.c2 in (3,4,7);
|
||||
select c1,c2 from t1 where t1.c2 in (3,4,7) order by 1;
|
||||
|
||||
explain (costs off) select c1,c3 from t1 where t1.c2 in (3,4,7);
|
||||
select c1,c3 from t1 where t1.c3 in (3,4,7) order by 1;
|
||||
|
||||
explain (costs off) select c2,c3 from t1 where t1.c2 in (3,4,7);
|
||||
select c2,c3 from t1 where t1.c3 in (3,4,7) order by 1;
|
||||
|
||||
explain (costs off) select t1.c1 as c1, t2.c2 as c2
|
||||
from t1,t2
|
||||
where t1.c1 = t2.c1 and t1.c1 in (3,4,5,6)
|
||||
order by 1,2;
|
||||
|
||||
select t1.c1 as c1, t2.c2 as c2
|
||||
from t1,t2
|
||||
where t1.c1 = t2.c1 and t1.c1 in (3,4,5,6)
|
||||
order by 1,2;
|
||||
|
||||
explain (costs off) select * from
|
||||
create table type
|
||||
(
|
||||
select t1.c1 as c1, t2.c2 as c2, count(*) as sum
|
||||
from t1,t2
|
||||
where t1.c1 = t2.c1
|
||||
group by 1,2
|
||||
) as dt where dt.c1 in (3,4,5,6)
|
||||
order by 1,2,3;
|
||||
col_int TINYINT
|
||||
,col_int2 SMALLINT
|
||||
,col_int4 INTEGER
|
||||
,col_int8 BIGINT
|
||||
,col_char CHAR(20)
|
||||
,col_varchar VARCHAR(30)
|
||||
,col_num DECIMAL(10,2)
|
||||
,col_num2 NUMERIC(10,4)
|
||||
,col_float FLOAT4
|
||||
,col_float2 FLOAT8
|
||||
,col_float3 FLOAT(3)
|
||||
,col_float4 BINARY_DOUBLE
|
||||
,col_float5 DECIMAL(10,4)
|
||||
,col_float6 INTEGER(6,3)
|
||||
,col_bool BOOLEAN
|
||||
,col_text TEXT
|
||||
)with (orientation=column);
|
||||
|
||||
select * from
|
||||
(
|
||||
select t1.c1 as c1, t2.c2 as c2, count(*) as sum
|
||||
from t1,t2
|
||||
where t1.c1 = t2.c1
|
||||
group by 1,2
|
||||
) as dt where dt.c1 in (3,4,5,6)
|
||||
order by 1,2,3;
|
||||
insert into type values
|
||||
(0, 5 , 193540, 1935401906, 'aabccd', 'aabccd', 1.20 , 10.0000, null , 1.1 , 10.1234, 321.321, 123.123654, 123.123654, true,'aabccd'),
|
||||
(1, 6 , 134597, 1345971420, 'abccd', 'abccd' , 11.18, 1.1181 , 55.555, 55.555, 10.1234, 321.321, 123.123654, 123.123654, false, 'abccd' ),
|
||||
(2, 7 , 656473, 656473370 , 'aabccd', 'aabccd', 1.20 , 10.0000, 1.1 , 1.1 , 10.1234, 321.321, 124.123654, 123.123654, true , 'aabccd'),
|
||||
(3, 8 , 126971, 1269710788, 'abccd', 'abccd' , 11.18, 1.1181 , 55.555, 55.555, 10.1234, 321.321, 123.123654, 123.123654, false, 'abccd' ),
|
||||
(4, 9 , 115677, 1156776517, 'aabccd', 'aabccd', 1.20 , 10.0000, 1.1 , 1.1 , 10.1234, 321.321, 123.123654, 124.123654, true , 'aabccd'),
|
||||
(5, 10, 128901, 1289013296, 'abccd', 'abccd' , 11.18, 1.1181 , 55.555, 55.555, 10.1234, 321.321, 123.123654, 123.123654, true , 'abccd' );
|
||||
|
||||
explain (costs off) select t1.c2, count(*) from t1 where t1.c1 in (1,2,3) group by t1.c2 having t1.c2 in (1,3) order by 1;
|
||||
select t1.c2, count(*) from t1 where t1.c1 in (1,2,3) group by t1.c2 having t1.c2 in (1,3) order by 1;
|
||||
select col_int from type where col_int in (1,2) order by 1;
|
||||
explain (costs off) select col_int from type where col_int in (1,2) order by 1;
|
||||
select col_int2 from type where col_int2 in (5,10) order by 1;
|
||||
explain (costs off) select col_int2 from type where col_int2 in (5,10) order by 1;
|
||||
select col_int4 from type where col_int4 in (134597, 134597) order by 1;
|
||||
explain (costs off) select col_int4 from type where col_int4 in (134597, 134597) order by 1;
|
||||
select col_int8 from type where col_int8 in (1345971420, 1156776517) order by 1;
|
||||
explain (costs off) select col_int8 from type where col_int8 in (1345971420, 1156776517) order by 1;
|
||||
select col_char from type where col_char in ('aabccd','aabccd', 'aab') order by 1;
|
||||
explain (costs off) select col_char from type where col_char in ('aabccd','aabccd', 'aab') order by 1;
|
||||
select col_varchar from type where col_varchar in ('abccd', 'abc','aac') order by 1;
|
||||
explain (costs off) select col_varchar from type where col_varchar in ('abccd', 'abc','aac') order by 1;
|
||||
select col_num from type where col_num in (1.20, 11.18, 3,45) order by 1;
|
||||
explain (costs off) select col_num from type where col_num in (1.20, 11.18, 3,45) order by 1;
|
||||
select col_num2 from type where col_num2 in (1.1181, 10.0000) order by 1;
|
||||
explain (costs off) select col_num2 from type where col_num2 in (1.1181, 10.0000) order by 1;
|
||||
select col_float from type where col_float in (1.1, 55.555) order by 1;
|
||||
explain (costs off) select col_float from type where col_float in (1.1, 55.555) order by 1;
|
||||
select col_float2 from type where col_float2 in (10.1234, 1.1, 11.2222) order by 1;
|
||||
explain (costs off) select col_float2 from type where col_float2 in (10.1234, 1.1, 11.2222) order by 1;
|
||||
select col_float3 from type where col_float3 in (341.321, 10.1234, 10.1114, 11.2222) order by 1;
|
||||
explain (costs off) select col_float3 from type where col_float3 in (341.321, 10.1234, 10.1114, 11.2222) order by 1;
|
||||
select col_float4 from type where col_float4 in (321.321, 500.123) order by 1;
|
||||
explain (costs off) select col_float4 from type where col_float4 in (321.321, 500.123) order by 1;
|
||||
select col_float5 from type where col_float5 in (123.123654, 123.1237) order by 1;
|
||||
explain (costs off) select col_float5 from type where col_float5 in (123.123654,123.1237) order by 1;
|
||||
select col_float6 from type where col_float6 in (123.124, 113.123654) order by 1;
|
||||
explain (costs off) select col_float6 from type where col_float6 in (123.124, 113.123654) order by 1;
|
||||
select col_bool from type where col_bool in (true, false) order by 1;
|
||||
explain (costs off) select col_bool from type where col_bool in (true, false) order by 1;
|
||||
select col_text from type where col_text in ('abccd', 'aab') order by 1;
|
||||
explain (costs off) select col_text from type where col_text in ('abccd', 'aab') order by 1;
|
||||
|
||||
explain (costs off) select t1.c3, t1.c2 from t1 where t1.c1 > 1 AND t1.c2 in (select t2.c2 from t2 where t2.c1 IN (3,4,5,6,7)) order by 1,2;
|
||||
select t1.c3, t1.c2 from t1 where t1.c1 > 1 AND t1.c2 in (select t2.c2 from t2 where t2.c1 IN (3,4,5,6,7)) order by 1,2;
|
||||
CREATE TABLE time
|
||||
(
|
||||
col_int int
|
||||
,col_date date
|
||||
,col_timestamp timestamp
|
||||
,col_timestamptz timestamptz
|
||||
,col_smalldatetime smalldatetime
|
||||
,col_char char
|
||||
,col_interval interval
|
||||
,col_time time
|
||||
,col_timetz timetz
|
||||
,col_tinterval tinterval
|
||||
)with (orientation=column);
|
||||
|
||||
select t1.c2, sum(t1.c3) from t1 where t1.c1 in (1,2,3) group by t1.c2 order by t1.c2 limit 2;
|
||||
select max(t1.c2) from t1 where t1.c1 < 4 and t1.c1 in (2,3,4);
|
||||
select t1.c2, t2.c3, count(*) from t1,t2 where t1.c1 = t2.c2 and t1.c1 in (1,2,3) group by t1.c2,t2.c3 order by t1.c2;
|
||||
select t1.c2, t2.c3, sum(t1.c3) from t1,t2 where t1.c1 = t2.c2 and t1.c1 in (1,2,3) group by t1.c2,t2.c3 order by t1.c2 limit 2;
|
||||
COPY time(col_int, col_date, col_timestamp, col_timestamptz, col_smalldatetime, col_char, col_interval, col_time, col_timetz, col_tinterval) FROM stdin;
|
||||
3 2011-11-01 00:00:00 2017-09-09 19:45:37 2017-09-09 19:45:37 2003-04-12 04:05:06 a 2 day 13:34:56 1984-2-6 01:00:30 1984-2-6 01:00:30+8 ["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]
|
||||
6 2012-11-02 00:00:00 2017-10-09 19:45:37 2017-10-09 19:45:37 2003-04-12 04:05:07 c 1 day 18:34:56 1986-2-6 03:00:30 1986-2-6 03:00:30+8 ["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]
|
||||
7 2011-11-01 00:00:00 2017-11-09 19:45:37 2017-11-09 19:45:37 2003-04-12 04:05:08 d 1 day 13:34:56 1987-2-6 08:00:30 1987-2-6 08:00:30+8 ["epoch" "Mon May 1 00:30:30 1995"]
|
||||
8 2012-11-02 00:00:00 2017-12-09 19:45:37 2017-12-09 19:45:37 2003-04-12 04:05:09 h 18 day 14:34:56 1989-2-6 06:00:30 1989-2-6 06:00:30+8 ["Feb 15 1990 12:15:03" "2001-09-23 11:12:13"]
|
||||
\.
|
||||
|
||||
select * from (select * from t1 where t1.c1 in (1,4,11) union all select * from t2) as dt order by 1;
|
||||
select * from (select * from t1 union all select * from t2 where t2.c1 in (1,4,11)) as dt order by 1;
|
||||
select * from (select * from t1 where t1.c1 in (1,4,11) union all select * from t2 where t2.c1 in (2,3)) as dt order by 1;
|
||||
select col_char from time where col_char in ('a', 'd') order by 1;
|
||||
explain (costs off) select col_char from time where col_char in ('a', 'd') order by 1;
|
||||
select col_date from time where col_date in ('2011-11-01 00:00:00', '2012-11-02 00:00:00') order by 1;
|
||||
explain (costs off) select col_date from time where col_date in ('2011-11-01 00:00:00', '2012-11-02 00:00:00') order by 1;
|
||||
select col_timestamp from time where col_timestamp in ('2017-09-09 19:45:37', '2017-09-09 19:45:37') order by 1;
|
||||
explain (costs off) select col_timestamp from time where col_timestamp in ('2017-09-09 19:45:37', '2017-09-09 19:45:37') order by 1;
|
||||
select col_timestamptz from time where col_timestamptz in ('2017-09-09 19:45:37', '2017-09-09 19:45:37') order by 1;
|
||||
explain (costs off) select col_timestamptz from time where col_timestamptz in ('2017-09-09 19:45:37', '2017-09-09 19:45:37') order by 1;
|
||||
select col_smalldatetime from time where col_smalldatetime in ('2017-09-09 19:45:37', '2003-04-12 04:05:06') order by 1;
|
||||
explain (costs off) select col_smalldatetime from time where col_smalldatetime in ('2017-09-09 19:45:37', '2003-04-12 04:05:06') order by 1;
|
||||
select col_time from time where col_time in ('08:00:30', '00:00:30', '12:00:30') order by 1;
|
||||
explain (costs off) select col_time from time where col_time in ('08:00:30', '00:00:30', '12:00:30') order by 1;
|
||||
select col_timetz from time where col_timetz in ('08:00:30+08', '00:00:30+08', '12:00:30+08') order by 1;
|
||||
explain (costs off) select col_timetz from time where col_timetz in ('08:00:30+08', '00:00:30+08', '12:00:30+08') order by 1;
|
||||
select col_interval from time where col_interval in ('2 day 13:34:56', '1 day 18:34:56') order by 1;
|
||||
explain (costs off) select col_interval from time where col_interval in ('2 day 13:34:56', '1 day 18:34:56') order by 1;
|
||||
select col_tinterval from time where col_tinterval in ('["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]', '["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]') order by 1;
|
||||
explain (costs off) select col_tinterval from time where col_tinterval in ('["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]', '["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]') order by 1;
|
||||
drop schema inlist2join_type_c cascade;
|
||||
|
||||
--测试expression inlist场景
|
||||
-- allow for inlist2join
|
||||
explain (costs off) select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c1 + 2) in (1,2,3,4,5) order by 1;
|
||||
select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c1 + 2) in (1,2,3,4,5) order by 1;
|
||||
|
||||
explain (costs off) select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c2 * 2) in (1,2,3,4,5) order by 1;
|
||||
select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c2 *2) in (1,2,3,4,5) order by 1;
|
||||
|
||||
-- disallow for inlistjoin
|
||||
explain (costs off) select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c1 + t1.c2) in (1,2,3,4,5) order by 1;
|
||||
select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c1 + t2.c2) in (1,2,3,4,5) order by 1;
|
||||
|
||||
--
|
||||
-- forbid inlist2join query rewrite if there's subplan
|
||||
set qrw_inlist2join_optmode=1;
|
||||
create table t3(c1 int, c2 int, c3 int) distribute by hash(c1);
|
||||
insert into t3 select v,v,v from generate_series(1,10) as v;
|
||||
|
||||
-- the sublink can be pull up, so there is no subpaln, do inlist2join
|
||||
explain (costs off) select * from t1 where t1.c1 in (select c1 from t2 where t2.c2 > 2) AND t1.c2 in (1,2,3);
|
||||
explain (costs off) select * from t1 where exists (select c1 from t2 where t2.c2 = t1.c1) and t1.c1 in (1,2,3);
|
||||
explain (costs off) select * from t1 join t2 on t1.c1=t2.c1 and t1.c1 not in (select c2 from t3 where t3.c2>2) and t1.c3 in (1,2,3);
|
||||
|
||||
-- the sublink can not be pull up, so there is subpaln, do not inlist2join
|
||||
explain (costs off) select * from t1 where t1.c1 in (select c1 from t2 where t2.c2 = t1.c2) AND t1.c2 in (1,2,3);
|
||||
explain (costs off) select * from t1 where exists (select c1 from t2 where t2.c2 > 2) and t1.c1 in (1,2,3);
|
||||
explain (costs off) select * from t1 join t2 on t1.c1=t2.c1 and t1.c1 not in (select c2 from t3 where t3.c2=t1.c2) and t1.c3 in (1,2,3);
|
||||
--
|
||||
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
drop schema inlist2join_c cascade;
|
||||
|
||||
@ -1,105 +1,94 @@
|
||||
create schema inlist2join_type;
|
||||
set current_schema=inlist2join_type;
|
||||
set qrw_inlist2join_optmode = 1;
|
||||
create schema inlist2join_c;
|
||||
set current_schema=inlist2join_c;
|
||||
set qrw_inlist2join_optmode=1;
|
||||
create table t1(c1 int, c2 int, c3 int) with (orientation=column);
|
||||
insert into t1 select v,v,v from generate_series(1,12) as v;
|
||||
create table t2(c1 int, c2 int, c3 int) with (orientation=column);
|
||||
insert into t2 select v,v,v from generate_series(1,10) as v;
|
||||
|
||||
create table type
|
||||
explain (costs off) select c1,c2 from t1 where t1.c2 in (3,4,7);
|
||||
select c1,c2 from t1 where t1.c2 in (3,4,7) order by 1;
|
||||
|
||||
explain (costs off) select c1,c3 from t1 where t1.c2 in (3,4,7);
|
||||
select c1,c3 from t1 where t1.c3 in (3,4,7) order by 1;
|
||||
|
||||
explain (costs off) select c2,c3 from t1 where t1.c2 in (3,4,7);
|
||||
select c2,c3 from t1 where t1.c3 in (3,4,7) order by 1;
|
||||
|
||||
explain (costs off) select t1.c1 as c1, t2.c2 as c2
|
||||
from t1,t2
|
||||
where t1.c1 = t2.c1 and t1.c1 in (3,4,5,6)
|
||||
order by 1,2;
|
||||
|
||||
select t1.c1 as c1, t2.c2 as c2
|
||||
from t1,t2
|
||||
where t1.c1 = t2.c1 and t1.c1 in (3,4,5,6)
|
||||
order by 1,2;
|
||||
|
||||
explain (costs off) select * from
|
||||
(
|
||||
col_int TINYINT
|
||||
,col_int2 SMALLINT
|
||||
,col_int4 INTEGER
|
||||
,col_int8 BIGINT
|
||||
,col_char CHAR(20)
|
||||
,col_varchar VARCHAR(30)
|
||||
,col_num DECIMAL(10,2)
|
||||
,col_num2 NUMERIC(10,4)
|
||||
,col_float FLOAT4
|
||||
,col_float2 FLOAT8
|
||||
,col_float3 FLOAT(3)
|
||||
,col_float4 BINARY_DOUBLE
|
||||
,col_float5 DECIMAL(10,4)
|
||||
,col_float6 INTEGER(6,3)
|
||||
,col_bool BOOLEAN
|
||||
,col_text TEXT
|
||||
)distribute by hash(col_int);
|
||||
select t1.c1 as c1, t2.c2 as c2, count(*) as sum
|
||||
from t1,t2
|
||||
where t1.c1 = t2.c1
|
||||
group by 1,2
|
||||
) as dt where dt.c1 in (3,4,5,6)
|
||||
order by 1,2,3;
|
||||
|
||||
insert into type values
|
||||
(0, 5 , 193540, 1935401906, 'aabccd', 'aabccd', 1.20 , 10.0000, null , 1.1 , 10.1234, 321.321, 123.123654, 123.123654, true,'aabccd'),
|
||||
(1, 6 , 134597, 1345971420, 'abccd', 'abccd' , 11.18, 1.1181 , 55.555, 55.555, 10.1234, 321.321, 123.123654, 123.123654, false, 'abccd' ),
|
||||
(2, 7 , 656473, 656473370 , 'aabccd', 'aabccd', 1.20 , 10.0000, 1.1 , 1.1 , 10.1234, 321.321, 124.123654, 123.123654, true , 'aabccd'),
|
||||
(3, 8 , 126971, 1269710788, 'abccd', 'abccd' , 11.18, 1.1181 , 55.555, 55.555, 10.1234, 321.321, 123.123654, 123.123654, false, 'abccd' ),
|
||||
(4, 9 , 115677, 1156776517, 'aabccd', 'aabccd', 1.20 , 10.0000, 1.1 , 1.1 , 10.1234, 321.321, 123.123654, 124.123654, true , 'aabccd'),
|
||||
(5, 10, 128901, 1289013296, 'abccd', 'abccd' , 11.18, 1.1181 , 55.555, 55.555, 10.1234, 321.321, 123.123654, 123.123654, true , 'abccd' );
|
||||
select * from
|
||||
(
|
||||
select t1.c1 as c1, t2.c2 as c2, count(*) as sum
|
||||
from t1,t2
|
||||
where t1.c1 = t2.c1
|
||||
group by 1,2
|
||||
) as dt where dt.c1 in (3,4,5,6)
|
||||
order by 1,2,3;
|
||||
|
||||
select col_int from type where col_int in (1,2) order by 1;
|
||||
explain (costs off) select col_int from type where col_int in (1,2) order by 1;
|
||||
select col_int2 from type where col_int2 in (5,10) order by 1;
|
||||
explain (costs off) select col_int2 from type where col_int2 in (5,10) order by 1;
|
||||
select col_int4 from type where col_int4 in (134597, 134597) order by 1;
|
||||
explain (costs off) select col_int4 from type where col_int4 in (134597, 134597) order by 1;
|
||||
select col_int8 from type where col_int8 in (1345971420, 1156776517) order by 1;
|
||||
explain (costs off) select col_int8 from type where col_int8 in (1345971420, 1156776517) order by 1;
|
||||
select col_char from type where col_char in ('aabccd','aabccd', 'aab') order by 1;
|
||||
explain (costs off) select col_char from type where col_char in ('aabccd','aabccd', 'aab') order by 1;
|
||||
select col_varchar from type where col_varchar in ('abccd', 'abc','aac') order by 1;
|
||||
explain (costs off) select col_varchar from type where col_varchar in ('abccd', 'abc','aac') order by 1;
|
||||
select col_num from type where col_num in (1.20, 11.18, 3,45) order by 1;
|
||||
explain (costs off) select col_num from type where col_num in (1.20, 11.18, 3,45) order by 1;
|
||||
select col_num2 from type where col_num2 in (1.1181, 10.0000) order by 1;
|
||||
explain (costs off) select col_num2 from type where col_num2 in (1.1181, 10.0000) order by 1;
|
||||
select col_float from type where col_float in (1.1, 55.555) order by 1;
|
||||
explain (costs off) select col_float from type where col_float in (1.1, 55.555) order by 1;
|
||||
select col_float2 from type where col_float2 in (10.1234, 1.1, 11.2222) order by 1;
|
||||
explain (costs off) select col_float2 from type where col_float2 in (10.1234, 1.1, 11.2222) order by 1;
|
||||
select col_float3 from type where col_float3 in (341.321, 10.1234, 10.1114, 11.2222) order by 1;
|
||||
explain (costs off) select col_float3 from type where col_float3 in (341.321, 10.1234, 10.1114, 11.2222) order by 1;
|
||||
select col_float4 from type where col_float4 in (321.321, 500.123) order by 1;
|
||||
explain (costs off) select col_float4 from type where col_float4 in (321.321, 500.123) order by 1;
|
||||
select col_float5 from type where col_float5 in (123.123654, 123.1237) order by 1;
|
||||
explain (costs off) select col_float5 from type where col_float5 in (123.123654,123.1237) order by 1;
|
||||
select col_float6 from type where col_float6 in (123.124, 113.123654) order by 1;
|
||||
explain (costs off) select col_float6 from type where col_float6 in (123.124, 113.123654) order by 1;
|
||||
select col_bool from type where col_bool in (true, false) order by 1;
|
||||
explain (costs off) select col_bool from type where col_bool in (true, false) order by 1;
|
||||
select col_text from type where col_text in ('abccd', 'aab') order by 1;
|
||||
explain (costs off) select col_text from type where col_text in ('abccd', 'aab') order by 1;
|
||||
explain (costs off) select t1.c2, count(*) from t1 where t1.c1 in (1,2,3) group by t1.c2 having t1.c2 in (1,3) order by 1;
|
||||
select t1.c2, count(*) from t1 where t1.c1 in (1,2,3) group by t1.c2 having t1.c2 in (1,3) order by 1;
|
||||
|
||||
CREATE TABLE time
|
||||
(
|
||||
col_int int
|
||||
,col_date date
|
||||
,col_timestamp timestamp
|
||||
,col_timestamptz timestamptz
|
||||
,col_smalldatetime smalldatetime
|
||||
,col_char char
|
||||
,col_interval interval
|
||||
,col_time time
|
||||
,col_timetz timetz
|
||||
,col_tinterval tinterval
|
||||
)distribute by hash(col_int);
|
||||
explain (costs off) select t1.c3, t1.c2 from t1 where t1.c1 > 1 AND t1.c2 in (select t2.c2 from t2 where t2.c1 IN (3,4,5,6,7)) order by 1,2;
|
||||
select t1.c3, t1.c2 from t1 where t1.c1 > 1 AND t1.c2 in (select t2.c2 from t2 where t2.c1 IN (3,4,5,6,7)) order by 1,2;
|
||||
|
||||
COPY time(col_int, col_date, col_timestamp, col_timestamptz, col_smalldatetime, col_char, col_interval, col_time, col_timetz, col_tinterval) FROM stdin;
|
||||
3 2011-11-01 00:00:00 2017-09-09 19:45:37 2017-09-09 19:45:37 2003-04-12 04:05:06 a 2 day 13:34:56 1984-2-6 01:00:30 1984-2-6 01:00:30+8 ["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]
|
||||
6 2012-11-02 00:00:00 2017-10-09 19:45:37 2017-10-09 19:45:37 2003-04-12 04:05:07 c 1 day 18:34:56 1986-2-6 03:00:30 1986-2-6 03:00:30+8 ["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]
|
||||
7 2011-11-01 00:00:00 2017-11-09 19:45:37 2017-11-09 19:45:37 2003-04-12 04:05:08 d 1 day 13:34:56 1987-2-6 08:00:30 1987-2-6 08:00:30+8 ["epoch" "Mon May 1 00:30:30 1995"]
|
||||
8 2012-11-02 00:00:00 2017-12-09 19:45:37 2017-12-09 19:45:37 2003-04-12 04:05:09 h 18 day 14:34:56 1989-2-6 06:00:30 1989-2-6 06:00:30+8 ["Feb 15 1990 12:15:03" "2001-09-23 11:12:13"]
|
||||
\.
|
||||
select t1.c2, sum(t1.c3) from t1 where t1.c1 in (1,2,3) group by t1.c2 order by t1.c2 limit 2;
|
||||
select max(t1.c2) from t1 where t1.c1 < 4 and t1.c1 in (2,3,4);
|
||||
select t1.c2, t2.c3, count(*) from t1,t2 where t1.c1 = t2.c2 and t1.c1 in (1,2,3) group by t1.c2,t2.c3 order by t1.c2;
|
||||
select t1.c2, t2.c3, sum(t1.c3) from t1,t2 where t1.c1 = t2.c2 and t1.c1 in (1,2,3) group by t1.c2,t2.c3 order by t1.c2 limit 2;
|
||||
|
||||
select * from (select * from t1 where t1.c1 in (1,4,11) union all select * from t2) as dt order by 1;
|
||||
select * from (select * from t1 union all select * from t2 where t2.c1 in (1,4,11)) as dt order by 1;
|
||||
select * from (select * from t1 where t1.c1 in (1,4,11) union all select * from t2 where t2.c1 in (2,3)) as dt order by 1;
|
||||
|
||||
--测试expression inlist场景
|
||||
-- allow for inlist2join
|
||||
explain (costs off) select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c1 + 2) in (1,2,3,4,5) order by 1;
|
||||
select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c1 + 2) in (1,2,3,4,5) order by 1;
|
||||
|
||||
explain (costs off) select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c2 * 2) in (1,2,3,4,5) order by 1;
|
||||
select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c2 *2) in (1,2,3,4,5) order by 1;
|
||||
|
||||
-- disallow for inlistjoin
|
||||
explain (costs off) select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c1 + t1.c2) in (1,2,3,4,5) order by 1;
|
||||
select t1.c1, t2.c1 from t1, t2 where t1.c1 = t2.c1 and (t1.c1 + t2.c2) in (1,2,3,4,5) order by 1;
|
||||
|
||||
--
|
||||
-- forbid inlist2join query rewrite if there's subplan
|
||||
set qrw_inlist2join_optmode=1;
|
||||
create table t3(c1 int, c2 int, c3 int);
|
||||
insert into t3 select v,v,v from generate_series(1,10) as v;
|
||||
|
||||
-- the sublink can be pull up, so there is no subpaln, do inlist2join
|
||||
explain (costs off) select * from t1 where t1.c1 in (select c1 from t2 where t2.c2 > 2) AND t1.c2 in (1,2,3);
|
||||
explain (costs off) select * from t1 where exists (select c1 from t2 where t2.c2 = t1.c1) and t1.c1 in (1,2,3);
|
||||
explain (costs off) select * from t1 join t2 on t1.c1=t2.c1 and t1.c1 not in (select c2 from t3 where t3.c2>2) and t1.c3 in (1,2,3);
|
||||
|
||||
-- the sublink can not be pull up, so there is subpaln, do not inlist2join
|
||||
explain (costs off) select * from t1 where t1.c1 in (select c1 from t2 where t2.c2 = t1.c2) AND t1.c2 in (1,2,3);
|
||||
explain (costs off) select * from t1 where exists (select c1 from t2 where t2.c2 > 2) and t1.c1 in (1,2,3);
|
||||
explain (costs off) select * from t1 join t2 on t1.c1=t2.c1 and t1.c1 not in (select c2 from t3 where t3.c2=t1.c2) and t1.c3 in (1,2,3);
|
||||
--
|
||||
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
drop schema inlist2join_c cascade;
|
||||
|
||||
select col_char from time where col_char in ('a', 'd') order by 1;
|
||||
explain (costs off) select col_char from time where col_char in ('a', 'd') order by 1;
|
||||
select col_date from time where col_date in ('2011-11-01 00:00:00', '2012-11-02 00:00:00') order by 1;
|
||||
explain (costs off) select col_date from time where col_date in ('2011-11-01 00:00:00', '2012-11-02 00:00:00') order by 1;
|
||||
select col_timestamp from time where col_timestamp in ('2017-09-09 19:45:37', '2017-09-09 19:45:37') order by 1;
|
||||
explain (costs off) select col_timestamp from time where col_timestamp in ('2017-09-09 19:45:37', '2017-09-09 19:45:37') order by 1;
|
||||
select col_timestamptz from time where col_timestamptz in ('2017-09-09 19:45:37', '2017-09-09 19:45:37') order by 1;
|
||||
explain (costs off) select col_timestamptz from time where col_timestamptz in ('2017-09-09 19:45:37', '2017-09-09 19:45:37') order by 1;
|
||||
select col_smalldatetime from time where col_smalldatetime in ('2017-09-09 19:45:37', '2003-04-12 04:05:06') order by 1;
|
||||
explain (costs off) select col_smalldatetime from time where col_smalldatetime in ('2017-09-09 19:45:37', '2003-04-12 04:05:06') order by 1;
|
||||
select col_time from time where col_time in ('08:00:30', '00:00:30', '12:00:30') order by 1;
|
||||
explain (costs off) select col_time from time where col_time in ('08:00:30', '00:00:30', '12:00:30') order by 1;
|
||||
select col_timetz from time where col_timetz in ('08:00:30+08', '00:00:30+08', '12:00:30+08') order by 1;
|
||||
explain (costs off) select col_timetz from time where col_timetz in ('08:00:30+08', '00:00:30+08', '12:00:30+08') order by 1;
|
||||
select col_interval from time where col_interval in ('2 day 13:34:56', '1 day 18:34:56') order by 1;
|
||||
explain (costs off) select col_interval from time where col_interval in ('2 day 13:34:56', '1 day 18:34:56') order by 1;
|
||||
select col_tinterval from time where col_tinterval in ('["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]', '["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]') order by 1;
|
||||
explain (costs off) select col_tinterval from time where col_tinterval in ('["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]', '["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]') order by 1;
|
||||
drop schema inlist2join_type cascade;
|
||||
|
||||
@ -20,8 +20,7 @@ create table type
|
||||
,col_float6 INTEGER(6,3)
|
||||
,col_bool BOOLEAN
|
||||
,col_text TEXT
|
||||
)with (orientation=column)
|
||||
distribute by hash(col_int);
|
||||
)with (orientation=column);
|
||||
|
||||
insert into type values
|
||||
(0, 5 , 193540, 1935401906, 'aabccd', 'aabccd', 1.20 , 10.0000, null , 1.1 , 10.1234, 321.321, 123.123654, 123.123654, true,'aabccd'),
|
||||
@ -76,8 +75,7 @@ CREATE TABLE time
|
||||
,col_time time
|
||||
,col_timetz timetz
|
||||
,col_tinterval tinterval
|
||||
)with (orientation=column)
|
||||
distribute by hash(col_int);
|
||||
)with (orientation=column);
|
||||
|
||||
COPY time(col_int, col_date, col_timestamp, col_timestamptz, col_smalldatetime, col_char, col_interval, col_time, col_timetz, col_tinterval) FROM stdin;
|
||||
3 2011-11-01 00:00:00 2017-09-09 19:45:37 2017-09-09 19:45:37 2003-04-12 04:05:06 a 2 day 13:34:56 1984-2-6 01:00:30 1984-2-6 01:00:30+8 ["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]
|
||||
@ -105,3 +103,4 @@ explain (costs off) select col_interval from time where col_interval in ('2 day
|
||||
select col_tinterval from time where col_tinterval in ('["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]', '["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]') order by 1;
|
||||
explain (costs off) select col_tinterval from time where col_tinterval in ('["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]', '["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]') order by 1;
|
||||
drop schema inlist2join_type_c cascade;
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
create schema magic_set;
|
||||
set search_path=magic_set;
|
||||
|
||||
create table magic_t1(a int, b varchar, c int, d int) distribute by hash(a);
|
||||
create table magic_t2(a int, b varchar, c int, d int) distribute by hash(a);
|
||||
create table magic_t3(a int, b varchar, c int, d int) distribute by hash(a);
|
||||
create table magic_t1(a int, b varchar, c int, d int);
|
||||
create table magic_t2(a int, b varchar, c int, d int);
|
||||
create table magic_t3(a int, b varchar, c int, d int);
|
||||
|
||||
insert into magic_t1 select generate_series(1, 1000), generate_series(1, 1000), generate_series(1, 1000), generate_series(1, 1000) from public.src;
|
||||
insert into magic_t2 select generate_series(1, 100), generate_series(1, 200), generate_series(1, 300), generate_series(1, 500) from public.src;
|
||||
@ -430,9 +430,9 @@ drop table magic_t1;
|
||||
drop table magic_t2;
|
||||
drop table magic_t3;
|
||||
|
||||
create table magic_t1(a int, b int, c int) distribute by hash(a);
|
||||
create table magic_t2(a int, b int, c int) distribute by hash(a);
|
||||
create table magic_t3(a int, b int, c int) distribute by hash(a);
|
||||
create table magic_t1(a int, b int, c int);
|
||||
create table magic_t2(a int, b int, c int);
|
||||
create table magic_t3(a int, b int, c int);
|
||||
insert into magic_t1 values(1, 1, 1);
|
||||
insert into magic_t2 values(1, 1, 1);
|
||||
insert into magic_t3 values(1, 1, 1);
|
||||
@ -448,10 +448,10 @@ drop table magic_t1;
|
||||
drop table magic_t2;
|
||||
drop table magic_t3;
|
||||
|
||||
create table magic_t1(t1_a int, t1_b varchar, t1_c int, t1_d int) distribute by hash(t1_a);
|
||||
create table magic_t2(t2_a int, t2_b varchar, t2_c int, t2_d int) distribute by hash(t2_a);
|
||||
create table magic_t3(t3_a int, t3_b varchar, t3_c int, t3_d int) distribute by hash(t3_a);
|
||||
create table magic_t4(t4_a int, t4_b varchar, t4_c int, t4_d int) distribute by hash(t4_a);
|
||||
create table magic_t1(t1_a int, t1_b varchar, t1_c int, t1_d int);
|
||||
create table magic_t2(t2_a int, t2_b varchar, t2_c int, t2_d int);
|
||||
create table magic_t3(t3_a int, t3_b varchar, t3_c int, t3_d int);
|
||||
create table magic_t4(t4_a int, t4_b varchar, t4_c int, t4_d int);
|
||||
|
||||
insert into magic_t1 values(generate_series(1, 100), generate_series(1, 100), generate_series(1, 100), generate_series(1, 100));
|
||||
insert into magic_t2 values(generate_series(1, 30), generate_series(1, 30), generate_series(1, 30), generate_series(1, 30));
|
||||
@ -631,3 +631,4 @@ drop table magic_t3;
|
||||
drop table magic_t4;
|
||||
|
||||
drop schema magic_set cascade;
|
||||
|
||||
|
||||
@ -15,8 +15,6 @@ grant all on function add_func(num1 int, num2 int) to public;
|
||||
grant all on type bool to public;
|
||||
grant all on language plpgsql to public;
|
||||
grant all on security_t1 to public with grant option;
|
||||
copy security_t1 to '/temp/copy_error';
|
||||
copy security_t1 from '/temp/copy_error';
|
||||
drop function add_func(num1 int, num2 int);
|
||||
drop view security_v1;
|
||||
drop table security_t1;
|
||||
drop table security_t1;
|
||||
|
||||
Reference in New Issue
Block a user