diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/regress/expected/brin_multi.out | 27 | ||||
-rw-r--r-- | src/test/regress/expected/memoize.out | 49 | ||||
-rw-r--r-- | src/test/regress/expected/partition_prune.out | 100 | ||||
-rw-r--r-- | src/test/regress/expected/select.out | 3 | ||||
-rw-r--r-- | src/test/regress/sql/memoize.sql | 5 | ||||
-rw-r--r-- | src/test/regress/sql/partition_prune.sql | 4 |
6 files changed, 40 insertions, 148 deletions
diff --git a/src/test/regress/expected/brin_multi.out b/src/test/regress/expected/brin_multi.out index cb5b5e53e86..991b7eacada 100644 --- a/src/test/regress/expected/brin_multi.out +++ b/src/test/regress/expected/brin_multi.out @@ -853,8 +853,7 @@ SELECT * FROM brin_date_test WHERE a = '2023-01-01'::date; Recheck Cond: (a = '2023-01-01'::date) -> Bitmap Index Scan on brin_date_test_a_idx (actual rows=0.00 loops=1) Index Cond: (a = '2023-01-01'::date) - Index Searches: 1 -(5 rows) +(4 rows) DROP TABLE brin_date_test; RESET enable_seqscan; @@ -873,8 +872,7 @@ SELECT * FROM brin_timestamp_test WHERE a = '2023-01-01'::timestamp; Recheck Cond: (a = '2023-01-01 00:00:00'::timestamp without time zone) -> Bitmap Index Scan on brin_timestamp_test_a_idx (actual rows=0.00 loops=1) Index Cond: (a = '2023-01-01 00:00:00'::timestamp without time zone) - Index Searches: 1 -(5 rows) +(4 rows) EXPLAIN (ANALYZE, TIMING OFF, COSTS OFF, SUMMARY OFF, BUFFERS OFF) SELECT * FROM brin_timestamp_test WHERE a = '1900-01-01'::timestamp; @@ -884,8 +882,7 @@ SELECT * FROM brin_timestamp_test WHERE a = '1900-01-01'::timestamp; Recheck Cond: (a = '1900-01-01 00:00:00'::timestamp without time zone) -> Bitmap Index Scan on brin_timestamp_test_a_idx (actual rows=0.00 loops=1) Index Cond: (a = '1900-01-01 00:00:00'::timestamp without time zone) - Index Searches: 1 -(5 rows) +(4 rows) DROP TABLE brin_timestamp_test; RESET enable_seqscan; @@ -903,8 +900,7 @@ SELECT * FROM brin_date_test WHERE a = '2023-01-01'::date; Recheck Cond: (a = '2023-01-01'::date) -> Bitmap Index Scan on brin_date_test_a_idx (actual rows=0.00 loops=1) Index Cond: (a = '2023-01-01'::date) - Index Searches: 1 -(5 rows) +(4 rows) EXPLAIN (ANALYZE, TIMING OFF, COSTS OFF, SUMMARY OFF, BUFFERS OFF) SELECT * FROM brin_date_test WHERE a = '1900-01-01'::date; @@ -914,8 +910,7 @@ SELECT * FROM brin_date_test WHERE a = '1900-01-01'::date; Recheck Cond: (a = '1900-01-01'::date) -> Bitmap Index Scan on brin_date_test_a_idx (actual rows=0.00 loops=1) Index Cond: (a = '1900-01-01'::date) - Index Searches: 1 -(5 rows) +(4 rows) DROP TABLE brin_date_test; RESET enable_seqscan; @@ -934,8 +929,7 @@ SELECT * FROM brin_interval_test WHERE a = '-30 years'::interval; Recheck Cond: (a = '@ 30 years ago'::interval) -> Bitmap Index Scan on brin_interval_test_a_idx (actual rows=0.00 loops=1) Index Cond: (a = '@ 30 years ago'::interval) - Index Searches: 1 -(5 rows) +(4 rows) EXPLAIN (ANALYZE, TIMING OFF, COSTS OFF, SUMMARY OFF, BUFFERS OFF) SELECT * FROM brin_interval_test WHERE a = '30 years'::interval; @@ -945,8 +939,7 @@ SELECT * FROM brin_interval_test WHERE a = '30 years'::interval; Recheck Cond: (a = '@ 30 years'::interval) -> Bitmap Index Scan on brin_interval_test_a_idx (actual rows=0.00 loops=1) Index Cond: (a = '@ 30 years'::interval) - Index Searches: 1 -(5 rows) +(4 rows) DROP TABLE brin_interval_test; RESET enable_seqscan; @@ -964,8 +957,7 @@ SELECT * FROM brin_interval_test WHERE a = '-30 years'::interval; Recheck Cond: (a = '@ 30 years ago'::interval) -> Bitmap Index Scan on brin_interval_test_a_idx (actual rows=0.00 loops=1) Index Cond: (a = '@ 30 years ago'::interval) - Index Searches: 1 -(5 rows) +(4 rows) EXPLAIN (ANALYZE, TIMING OFF, COSTS OFF, SUMMARY OFF, BUFFERS OFF) SELECT * FROM brin_interval_test WHERE a = '30 years'::interval; @@ -975,8 +967,7 @@ SELECT * FROM brin_interval_test WHERE a = '30 years'::interval; Recheck Cond: (a = '@ 30 years'::interval) -> Bitmap Index Scan on brin_interval_test_a_idx (actual rows=0.00 loops=1) Index Cond: (a = '@ 30 years'::interval) - Index Searches: 1 -(5 rows) +(4 rows) DROP TABLE brin_interval_test; RESET enable_seqscan; diff --git a/src/test/regress/expected/memoize.out b/src/test/regress/expected/memoize.out index 38dfaf021c9..22f2d32845e 100644 --- a/src/test/regress/expected/memoize.out +++ b/src/test/regress/expected/memoize.out @@ -22,9 +22,8 @@ begin ln := regexp_replace(ln, 'Evictions: 0', 'Evictions: Zero'); ln := regexp_replace(ln, 'Evictions: \d+', 'Evictions: N'); ln := regexp_replace(ln, 'Memory Usage: \d+', 'Memory Usage: N'); - ln := regexp_replace(ln, 'Heap Fetches: \d+', 'Heap Fetches: N'); - ln := regexp_replace(ln, 'loops=\d+', 'loops=N'); - ln := regexp_replace(ln, 'Index Searches: \d+', 'Index Searches: N'); + ln := regexp_replace(ln, 'Heap Fetches: \d+', 'Heap Fetches: N'); + ln := regexp_replace(ln, 'loops=\d+', 'loops=N'); return next ln; end loop; end; @@ -50,8 +49,7 @@ WHERE t2.unique1 < 1000;', false); -> Index Only Scan using tenk1_unique1 on tenk1 t1 (actual rows=1.00 loops=N) Index Cond: (unique1 = t2.twenty) Heap Fetches: N - Index Searches: N -(13 rows) +(12 rows) -- And check we get the expected results. SELECT COUNT(*),AVG(t1.unique1) FROM tenk1 t1 @@ -82,8 +80,7 @@ WHERE t1.unique1 < 1000;', false); -> Index Only Scan using tenk1_unique1 on tenk1 t2 (actual rows=1.00 loops=N) Index Cond: (unique1 = t1.twenty) Heap Fetches: N - Index Searches: N -(13 rows) +(12 rows) -- And check we get the expected results. SELECT COUNT(*),AVG(t2.unique1) FROM tenk1 t1, @@ -109,7 +106,6 @@ WHERE t1.unique1 < 10;', false); -> Nested Loop Left Join (actual rows=20.00 loops=N) -> Index Scan using tenk1_unique1 on tenk1 t1 (actual rows=10.00 loops=N) Index Cond: (unique1 < 10) - Index Searches: N -> Memoize (actual rows=2.00 loops=N) Cache Key: t1.two Cache Mode: binary @@ -119,8 +115,7 @@ WHERE t1.unique1 < 10;', false); Rows Removed by Filter: 2 -> Index Scan using tenk1_unique1 on tenk1 t2_1 (actual rows=4.00 loops=N) Index Cond: (unique1 < 4) - Index Searches: N -(15 rows) +(13 rows) -- And check we get the expected results. SELECT COUNT(*),AVG(t2.t1two) FROM tenk1 t1 LEFT JOIN @@ -154,8 +149,7 @@ WHERE s.c1 = s.c2 AND t1.unique1 < 1000;', false); Filter: ((t1.two + 1) = unique1) Rows Removed by Filter: 9999 Heap Fetches: N - Index Searches: N -(14 rows) +(13 rows) -- And check we get the expected results. SELECT COUNT(*), AVG(t1.twenty) FROM tenk1 t1 LEFT JOIN @@ -225,8 +219,7 @@ ON t1.x = t2.t::numeric AND t1.t::numeric = t2.x;', false); Index Cond: (x = (t1.t)::numeric) Filter: (t1.x = (t)::numeric) Heap Fetches: N - Index Searches: N -(11 rows) +(10 rows) DROP TABLE expr_key; -- Reduce work_mem and hash_mem_multiplier so that we see some cache evictions @@ -253,8 +246,7 @@ WHERE t2.unique1 < 1200;', true); -> Index Only Scan using tenk1_unique1 on tenk1 t1 (actual rows=1.00 loops=N) Index Cond: (unique1 = t2.thousand) Heap Fetches: N - Index Searches: N -(13 rows) +(12 rows) CREATE TABLE flt (f float); CREATE INDEX flt_f_idx ON flt (f); @@ -269,7 +261,6 @@ SELECT * FROM flt f1 INNER JOIN flt f2 ON f1.f = f2.f;', false); Nested Loop (actual rows=4.00 loops=N) -> Index Only Scan using flt_f_idx on flt f1 (actual rows=2.00 loops=N) Heap Fetches: N - Index Searches: N -> Memoize (actual rows=2.00 loops=N) Cache Key: f1.f Cache Mode: logical @@ -277,8 +268,7 @@ SELECT * FROM flt f1 INNER JOIN flt f2 ON f1.f = f2.f;', false); -> Index Only Scan using flt_f_idx on flt f2 (actual rows=2.00 loops=N) Index Cond: (f = f1.f) Heap Fetches: N - Index Searches: N -(12 rows) +(10 rows) -- Ensure memoize operates in binary mode SELECT explain_memoize(' @@ -288,7 +278,6 @@ SELECT * FROM flt f1 INNER JOIN flt f2 ON f1.f >= f2.f;', false); Nested Loop (actual rows=4.00 loops=N) -> Index Only Scan using flt_f_idx on flt f1 (actual rows=2.00 loops=N) Heap Fetches: N - Index Searches: N -> Memoize (actual rows=2.00 loops=N) Cache Key: f1.f Cache Mode: binary @@ -296,8 +285,7 @@ SELECT * FROM flt f1 INNER JOIN flt f2 ON f1.f >= f2.f;', false); -> Index Only Scan using flt_f_idx on flt f2 (actual rows=2.00 loops=N) Index Cond: (f <= f1.f) Heap Fetches: N - Index Searches: N -(12 rows) +(10 rows) DROP TABLE flt; -- Exercise Memoize in binary mode with a large fixed width type and a @@ -323,8 +311,7 @@ SELECT * FROM strtest s1 INNER JOIN strtest s2 ON s1.n >= s2.n;', false); Hits: 3 Misses: 3 Evictions: Zero Overflows: 0 Memory Usage: NkB -> Index Scan using strtest_n_idx on strtest s2 (actual rows=4.00 loops=N) Index Cond: (n <= s1.n) - Index Searches: N -(10 rows) +(9 rows) -- Ensure we get 3 hits and 3 misses SELECT explain_memoize(' @@ -340,8 +327,7 @@ SELECT * FROM strtest s1 INNER JOIN strtest s2 ON s1.t >= s2.t;', false); Hits: 3 Misses: 3 Evictions: Zero Overflows: 0 Memory Usage: NkB -> Index Scan using strtest_t_idx on strtest s2 (actual rows=4.00 loops=N) Index Cond: (t <= s1.t) - Index Searches: N -(10 rows) +(9 rows) DROP TABLE strtest; -- Ensure memoize works with partitionwise join @@ -362,7 +348,6 @@ SELECT * FROM prt t1 INNER JOIN prt t2 ON t1.a = t2.a;', false); -> Nested Loop (actual rows=16.00 loops=N) -> Index Only Scan using iprt_p1_a on prt_p1 t1_1 (actual rows=4.00 loops=N) Heap Fetches: N - Index Searches: N -> Memoize (actual rows=4.00 loops=N) Cache Key: t1_1.a Cache Mode: logical @@ -370,11 +355,9 @@ SELECT * FROM prt t1 INNER JOIN prt t2 ON t1.a = t2.a;', false); -> Index Only Scan using iprt_p1_a on prt_p1 t2_1 (actual rows=4.00 loops=N) Index Cond: (a = t1_1.a) Heap Fetches: N - Index Searches: N -> Nested Loop (actual rows=16.00 loops=N) -> Index Only Scan using iprt_p2_a on prt_p2 t1_2 (actual rows=4.00 loops=N) Heap Fetches: N - Index Searches: N -> Memoize (actual rows=4.00 loops=N) Cache Key: t1_2.a Cache Mode: logical @@ -382,8 +365,7 @@ SELECT * FROM prt t1 INNER JOIN prt t2 ON t1.a = t2.a;', false); -> Index Only Scan using iprt_p2_a on prt_p2 t2_2 (actual rows=4.00 loops=N) Index Cond: (a = t1_2.a) Heap Fetches: N - Index Searches: N -(25 rows) +(21 rows) -- Ensure memoize works with parameterized union-all Append path SET enable_partitionwise_join TO off; @@ -396,7 +378,6 @@ ON t1.a = t2.a;', false); Nested Loop (actual rows=16.00 loops=N) -> Index Only Scan using iprt_p1_a on prt_p1 t1 (actual rows=4.00 loops=N) Heap Fetches: N - Index Searches: N -> Memoize (actual rows=4.00 loops=N) Cache Key: t1.a Cache Mode: logical @@ -405,12 +386,10 @@ ON t1.a = t2.a;', false); -> Index Only Scan using iprt_p1_a on prt_p1 (actual rows=4.00 loops=N) Index Cond: (a = t1.a) Heap Fetches: N - Index Searches: N -> Index Only Scan using iprt_p2_a on prt_p2 (actual rows=0.00 loops=N) Index Cond: (a = t1.a) Heap Fetches: N - Index Searches: N -(17 rows) +(14 rows) DROP TABLE prt; RESET enable_partitionwise_join; diff --git a/src/test/regress/expected/partition_prune.out b/src/test/regress/expected/partition_prune.out index 34f2b0b8dbd..d95d2395d48 100644 --- a/src/test/regress/expected/partition_prune.out +++ b/src/test/regress/expected/partition_prune.out @@ -2369,10 +2369,6 @@ begin ln := regexp_replace(ln, 'Workers Launched: \d+', 'Workers Launched: N'); ln := regexp_replace(ln, 'actual rows=\d+(?:\.\d+)? loops=\d+', 'actual rows=N loops=N'); ln := regexp_replace(ln, 'Rows Removed by Filter: \d+', 'Rows Removed by Filter: N'); - perform regexp_matches(ln, 'Index Searches: \d+'); - if found then - continue; - end if; return next ln; end loop; end; @@ -2690,56 +2686,47 @@ select * from ab where a = (select max(a) from lprt_a) and b = (select max(a)-1 Filter: (b = (InitPlan 2).col1) -> Bitmap Index Scan on ab_a1_b1_a_idx (never executed) Index Cond: (a = (InitPlan 1).col1) - Index Searches: 0 -> Bitmap Heap Scan on ab_a1_b2 ab_2 (never executed) Recheck Cond: (a = (InitPlan 1).col1) Filter: (b = (InitPlan 2).col1) -> Bitmap Index Scan on ab_a1_b2_a_idx (never executed) Index Cond: (a = (InitPlan 1).col1) - Index Searches: 0 -> Bitmap Heap Scan on ab_a1_b3 ab_3 (never executed) Recheck Cond: (a = (InitPlan 1).col1) Filter: (b = (InitPlan 2).col1) -> Bitmap Index Scan on ab_a1_b3_a_idx (never executed) Index Cond: (a = (InitPlan 1).col1) - Index Searches: 0 -> Bitmap Heap Scan on ab_a2_b1 ab_4 (never executed) Recheck Cond: (a = (InitPlan 1).col1) Filter: (b = (InitPlan 2).col1) -> Bitmap Index Scan on ab_a2_b1_a_idx (never executed) Index Cond: (a = (InitPlan 1).col1) - Index Searches: 0 -> Bitmap Heap Scan on ab_a2_b2 ab_5 (never executed) Recheck Cond: (a = (InitPlan 1).col1) Filter: (b = (InitPlan 2).col1) -> Bitmap Index Scan on ab_a2_b2_a_idx (never executed) Index Cond: (a = (InitPlan 1).col1) - Index Searches: 0 -> Bitmap Heap Scan on ab_a2_b3 ab_6 (never executed) Recheck Cond: (a = (InitPlan 1).col1) Filter: (b = (InitPlan 2).col1) -> Bitmap Index Scan on ab_a2_b3_a_idx (never executed) Index Cond: (a = (InitPlan 1).col1) - Index Searches: 0 -> Bitmap Heap Scan on ab_a3_b1 ab_7 (never executed) Recheck Cond: (a = (InitPlan 1).col1) Filter: (b = (InitPlan 2).col1) -> Bitmap Index Scan on ab_a3_b1_a_idx (never executed) Index Cond: (a = (InitPlan 1).col1) - Index Searches: 0 -> Bitmap Heap Scan on ab_a3_b2 ab_8 (actual rows=0.00 loops=1) Recheck Cond: (a = (InitPlan 1).col1) Filter: (b = (InitPlan 2).col1) -> Bitmap Index Scan on ab_a3_b2_a_idx (actual rows=0.00 loops=1) Index Cond: (a = (InitPlan 1).col1) - Index Searches: 1 -> Bitmap Heap Scan on ab_a3_b3 ab_9 (never executed) Recheck Cond: (a = (InitPlan 1).col1) Filter: (b = (InitPlan 2).col1) -> Bitmap Index Scan on ab_a3_b3_a_idx (never executed) Index Cond: (a = (InitPlan 1).col1) - Index Searches: 0 -(61 rows) +(52 rows) -- Test run-time partition pruning with UNION ALL parents explain (analyze, costs off, summary off, timing off, buffers off) @@ -2755,19 +2742,16 @@ select * from (select * from ab where a = 1 union all select * from ab) ab where Filter: (b = (InitPlan 1).col1) -> Bitmap Index Scan on ab_a1_b1_a_idx (actual rows=0.00 loops=1) Index Cond: (a = 1) - Index Searches: 1 -> Bitmap Heap Scan on ab_a1_b2 ab_12 (never executed) Recheck Cond: (a = 1) Filter: (b = (InitPlan 1).col1) -> Bitmap Index Scan on ab_a1_b2_a_idx (never executed) Index Cond: (a = 1) - Index Searches: 0 -> Bitmap Heap Scan on ab_a1_b3 ab_13 (never executed) Recheck Cond: (a = 1) Filter: (b = (InitPlan 1).col1) -> Bitmap Index Scan on ab_a1_b3_a_idx (never executed) Index Cond: (a = 1) - Index Searches: 0 -> Seq Scan on ab_a1_b1 ab_1 (actual rows=0.00 loops=1) Filter: (b = (InitPlan 1).col1) -> Seq Scan on ab_a1_b2 ab_2 (never executed) @@ -2786,7 +2770,7 @@ select * from (select * from ab where a = 1 union all select * from ab) ab where Filter: (b = (InitPlan 1).col1) -> Seq Scan on ab_a3_b3 ab_9 (never executed) Filter: (b = (InitPlan 1).col1) -(40 rows) +(37 rows) -- A case containing a UNION ALL with a non-partitioned child. explain (analyze, costs off, summary off, timing off, buffers off) @@ -2802,19 +2786,16 @@ select * from (select * from ab where a = 1 union all (values(10,5)) union all s Filter: (b = (InitPlan 1).col1) -> Bitmap Index Scan on ab_a1_b1_a_idx (actual rows=0.00 loops=1) Index Cond: (a = 1) - Index Searches: 1 -> Bitmap Heap Scan on ab_a1_b2 ab_12 (never executed) Recheck Cond: (a = 1) Filter: (b = (InitPlan 1).col1) -> Bitmap Index Scan on ab_a1_b2_a_idx (never executed) Index Cond: (a = 1) - Index Searches: 0 -> Bitmap Heap Scan on ab_a1_b3 ab_13 (never executed) Recheck Cond: (a = 1) Filter: (b = (InitPlan 1).col1) -> Bitmap Index Scan on ab_a1_b3_a_idx (never executed) Index Cond: (a = 1) - Index Searches: 0 -> Result (actual rows=0.00 loops=1) One-Time Filter: (5 = (InitPlan 1).col1) -> Seq Scan on ab_a1_b1 ab_1 (actual rows=0.00 loops=1) @@ -2835,7 +2816,7 @@ select * from (select * from ab where a = 1 union all (values(10,5)) union all s Filter: (b = (InitPlan 1).col1) -> Seq Scan on ab_a3_b3 ab_9 (never executed) Filter: (b = (InitPlan 1).col1) -(42 rows) +(39 rows) -- Another UNION ALL test, but containing a mix of exec init and exec run-time pruning. create table xy_1 (x int, y int); @@ -2906,19 +2887,16 @@ update ab_a1 set b = 3 from ab where ab.a = 1 and ab.a = ab_a1.a;'); Recheck Cond: (a = 1) -> Bitmap Index Scan on ab_a1_b1_a_idx (actual rows=0.00 loops=1) Index Cond: (a = 1) - Index Searches: 1 -> Bitmap Heap Scan on ab_a1_b2 ab_a1_2 (actual rows=1.00 loops=1) Recheck Cond: (a = 1) Heap Blocks: exact=1 -> Bitmap Index Scan on ab_a1_b2_a_idx (actual rows=1.00 loops=1) Index Cond: (a = 1) - Index Searches: 1 -> Bitmap Heap Scan on ab_a1_b3 ab_a1_3 (actual rows=0.00 loops=1) Recheck Cond: (a = 1) Heap Blocks: exact=1 -> Bitmap Index Scan on ab_a1_b3_a_idx (actual rows=1.00 loops=1) Index Cond: (a = 1) - Index Searches: 1 -> Materialize (actual rows=1.00 loops=1) Storage: Memory Maximum Storage: NkB -> Append (actual rows=1.00 loops=1) @@ -2926,20 +2904,17 @@ update ab_a1 set b = 3 from ab where ab.a = 1 and ab.a = ab_a1.a;'); Recheck Cond: (a = 1) -> Bitmap Index Scan on ab_a1_b1_a_idx (actual rows=0.00 loops=1) Index Cond: (a = 1) - Index Searches: 1 -> Bitmap Heap Scan on ab_a1_b2 ab_2 (actual rows=1.00 loops=1) Recheck Cond: (a = 1) Heap Blocks: exact=1 -> Bitmap Index Scan on ab_a1_b2_a_idx (actual rows=1.00 loops=1) Index Cond: (a = 1) - Index Searches: 1 -> Bitmap Heap Scan on ab_a1_b3 ab_3 (actual rows=0.00 loops=1) Recheck Cond: (a = 1) Heap Blocks: exact=1 -> Bitmap Index Scan on ab_a1_b3_a_idx (actual rows=1.00 loops=1) Index Cond: (a = 1) - Index Searches: 1 -(43 rows) +(37 rows) table ab; a | b @@ -3015,23 +2990,17 @@ select * from tbl1 join tprt on tbl1.col1 > tprt.col1; -> Append (actual rows=3.00 loops=2) -> Index Scan using tprt1_idx on tprt_1 (actual rows=2.00 loops=2) Index Cond: (col1 < tbl1.col1) - Index Searches: 2 -> Index Scan using tprt2_idx on tprt_2 (actual rows=2.00 loops=1) Index Cond: (col1 < tbl1.col1) - Index Searches: 1 -> Index Scan using tprt3_idx on tprt_3 (never executed) Index Cond: (col1 < tbl1.col1) - Index Searches: 0 -> Index Scan using tprt4_idx on tprt_4 (never executed) Index Cond: (col1 < tbl1.col1) - Index Searches: 0 -> Index Scan using tprt5_idx on tprt_5 (never executed) Index Cond: (col1 < tbl1.col1) - Index Searches: 0 -> Index Scan using tprt6_idx on tprt_6 (never executed) Index Cond: (col1 < tbl1.col1) - Index Searches: 0 -(21 rows) +(15 rows) explain (analyze, costs off, summary off, timing off, buffers off) select * from tbl1 join tprt on tbl1.col1 = tprt.col1; @@ -3042,23 +3011,17 @@ select * from tbl1 join tprt on tbl1.col1 = tprt.col1; -> Append (actual rows=1.00 loops=2) -> Index Scan using tprt1_idx on tprt_1 (never executed) Index Cond: (col1 = tbl1.col1) - Index Searches: 0 -> Index Scan using tprt2_idx on tprt_2 (actual rows=1.00 loops=2) Index Cond: (col1 = tbl1.col1) - Index Searches: 2 -> Index Scan using tprt3_idx on tprt_3 (never executed) Index Cond: (col1 = tbl1.col1) - Index Searches: 0 -> Index Scan using tprt4_idx on tprt_4 (never executed) Index Cond: (col1 = tbl1.col1) - Index Searches: 0 -> Index Scan using tprt5_idx on tprt_5 (never executed) Index Cond: (col1 = tbl1.col1) - Index Searches: 0 -> Index Scan using tprt6_idx on tprt_6 (never executed) Index Cond: (col1 = tbl1.col1) - Index Searches: 0 -(21 rows) +(15 rows) select tbl1.col1, tprt.col1 from tbl1 inner join tprt on tbl1.col1 > tprt.col1 @@ -3093,23 +3056,17 @@ select * from tbl1 inner join tprt on tbl1.col1 > tprt.col1; -> Append (actual rows=4.60 loops=5) -> Index Scan using tprt1_idx on tprt_1 (actual rows=2.00 loops=5) Index Cond: (col1 < tbl1.col1) - Index Searches: 5 -> Index Scan using tprt2_idx on tprt_2 (actual rows=2.75 loops=4) Index Cond: (col1 < tbl1.col1) - Index Searches: 4 -> Index Scan using tprt3_idx on tprt_3 (actual rows=1.00 loops=2) Index Cond: (col1 < tbl1.col1) - Index Searches: 2 -> Index Scan using tprt4_idx on tprt_4 (never executed) Index Cond: (col1 < tbl1.col1) - Index Searches: 0 -> Index Scan using tprt5_idx on tprt_5 (never executed) Index Cond: (col1 < tbl1.col1) - Index Searches: 0 -> Index Scan using tprt6_idx on tprt_6 (never executed) Index Cond: (col1 < tbl1.col1) - Index Searches: 0 -(21 rows) +(15 rows) explain (analyze, costs off, summary off, timing off, buffers off) select * from tbl1 inner join tprt on tbl1.col1 = tprt.col1; @@ -3120,23 +3077,17 @@ select * from tbl1 inner join tprt on tbl1.col1 = tprt.col1; -> Append (actual rows=0.60 loops=5) -> Index Scan using tprt1_idx on tprt_1 (never executed) Index Cond: (col1 = tbl1.col1) - Index Searches: 0 -> Index Scan using tprt2_idx on tprt_2 (actual rows=1.00 loops=2) Index Cond: (col1 = tbl1.col1) - Index Searches: 2 -> Index Scan using tprt3_idx on tprt_3 (actual rows=0.33 loops=3) Index Cond: (col1 = tbl1.col1) - Index Searches: 3 -> Index Scan using tprt4_idx on tprt_4 (never executed) Index Cond: (col1 = tbl1.col1) - Index Searches: 0 -> Index Scan using tprt5_idx on tprt_5 (never executed) Index Cond: (col1 = tbl1.col1) - Index Searches: 0 -> Index Scan using tprt6_idx on tprt_6 (never executed) Index Cond: (col1 = tbl1.col1) - Index Searches: 0 -(21 rows) +(15 rows) select tbl1.col1, tprt.col1 from tbl1 inner join tprt on tbl1.col1 > tprt.col1 @@ -3190,23 +3141,17 @@ select * from tbl1 join tprt on tbl1.col1 < tprt.col1; -> Append (actual rows=1.00 loops=1) -> Index Scan using tprt1_idx on tprt_1 (never executed) Index Cond: (col1 > tbl1.col1) - Index Searches: 0 -> Index Scan using tprt2_idx on tprt_2 (never executed) Index Cond: (col1 > tbl1.col1) - Index Searches: 0 -> Index Scan using tprt3_idx on tprt_3 (never executed) Index Cond: (col1 > tbl1.col1) - Index Searches: 0 -> Index Scan using tprt4_idx on tprt_4 (never executed) Index Cond: (col1 > tbl1.col1) - Index Searches: 0 -> Index Scan using tprt5_idx on tprt_5 (never executed) Index Cond: (col1 > tbl1.col1) - Index Searches: 0 -> Index Scan using tprt6_idx on tprt_6 (actual rows=1.00 loops=1) Index Cond: (col1 > tbl1.col1) - Index Searches: 1 -(21 rows) +(15 rows) select tbl1.col1, tprt.col1 from tbl1 inner join tprt on tbl1.col1 < tprt.col1 @@ -3228,23 +3173,17 @@ select * from tbl1 join tprt on tbl1.col1 = tprt.col1; -> Append (actual rows=0.00 loops=1) -> Index Scan using tprt1_idx on tprt_1 (never executed) Index Cond: (col1 = tbl1.col1) - Index Searches: 0 -> Index Scan using tprt2_idx on tprt_2 (never executed) Index Cond: (col1 = tbl1.col1) - Index Searches: 0 -> Index Scan using tprt3_idx on tprt_3 (never executed) Index Cond: (col1 = tbl1.col1) - Index Searches: 0 -> Index Scan using tprt4_idx on tprt_4 (never executed) Index Cond: (col1 = tbl1.col1) - Index Searches: 0 -> Index Scan using tprt5_idx on tprt_5 (never executed) Index Cond: (col1 = tbl1.col1) - Index Searches: 0 -> Index Scan using tprt6_idx on tprt_6 (never executed) Index Cond: (col1 = tbl1.col1) - Index Searches: 0 -(21 rows) +(15 rows) select tbl1.col1, tprt.col1 from tbl1 inner join tprt on tbl1.col1 = tprt.col1 @@ -3574,12 +3513,10 @@ explain (analyze, costs off, summary off, timing off, buffers off) execute mt_q1 -> Index Scan using ma_test_p2_b_idx on ma_test_p2 ma_test_1 (actual rows=1.00 loops=1) Filter: ((a >= $1) AND ((a % 10) = 5)) Rows Removed by Filter: 9 - Index Searches: 1 -> Index Scan using ma_test_p3_b_idx on ma_test_p3 ma_test_2 (actual rows=1.00 loops=1) Filter: ((a >= $1) AND ((a % 10) = 5)) Rows Removed by Filter: 9 - Index Searches: 1 -(11 rows) +(9 rows) execute mt_q1(15); a @@ -3597,8 +3534,7 @@ explain (analyze, costs off, summary off, timing off, buffers off) execute mt_q1 -> Index Scan using ma_test_p3_b_idx on ma_test_p3 ma_test_1 (actual rows=1.00 loops=1) Filter: ((a >= $1) AND ((a % 10) = 5)) Rows Removed by Filter: 9 - Index Searches: 1 -(7 rows) +(6 rows) execute mt_q1(25); a @@ -3646,17 +3582,13 @@ explain (analyze, costs off, summary off, timing off, buffers off) select * from -> Limit (actual rows=1.00 loops=1) -> Index Scan using ma_test_p2_b_idx on ma_test_p2 (actual rows=1.00 loops=1) Index Cond: (b IS NOT NULL) - Index Searches: 1 -> Index Scan using ma_test_p1_b_idx on ma_test_p1 ma_test_1 (never executed) Filter: (a >= (InitPlan 2).col1) - Index Searches: 0 -> Index Scan using ma_test_p2_b_idx on ma_test_p2 ma_test_2 (actual rows=10.00 loops=1) Filter: (a >= (InitPlan 2).col1) - Index Searches: 1 -> Index Scan using ma_test_p3_b_idx on ma_test_p3 ma_test_3 (actual rows=10.00 loops=1) Filter: (a >= (InitPlan 2).col1) - Index Searches: 1 -(18 rows) +(14 rows) reset enable_seqscan; reset enable_sort; @@ -4227,17 +4159,13 @@ select * from rangep where b IN((select 1),(select 2)) order by a; Sort Key: rangep_2.a -> Index Scan using rangep_0_to_100_1_a_idx on rangep_0_to_100_1 rangep_2 (actual rows=0.00 loops=1) Filter: (b = ANY (ARRAY[(InitPlan 1).col1, (InitPlan 2).col1])) - Index Searches: 1 -> Index Scan using rangep_0_to_100_2_a_idx on rangep_0_to_100_2 rangep_3 (actual rows=0.00 loops=1) Filter: (b = ANY (ARRAY[(InitPlan 1).col1, (InitPlan 2).col1])) - Index Searches: 1 -> Index Scan using rangep_0_to_100_3_a_idx on rangep_0_to_100_3 rangep_4 (never executed) Filter: (b = ANY (ARRAY[(InitPlan 1).col1, (InitPlan 2).col1])) - Index Searches: 0 -> Index Scan using rangep_100_to_200_a_idx on rangep_100_to_200 rangep_5 (actual rows=0.00 loops=1) Filter: (b = ANY (ARRAY[(InitPlan 1).col1, (InitPlan 2).col1])) - Index Searches: 1 -(19 rows) +(15 rows) reset enable_sort; drop table rangep; diff --git a/src/test/regress/expected/select.out b/src/test/regress/expected/select.out index bab0cc93ff5..cd79abc35db 100644 --- a/src/test/regress/expected/select.out +++ b/src/test/regress/expected/select.out @@ -764,8 +764,7 @@ select * from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; Index Scan using onek2_u2_prtl on onek2 (actual rows=1.00 loops=1) Index Cond: (unique2 = 11) Filter: (stringu1 = 'ATAAAA'::name) - Index Searches: 1 -(4 rows) +(3 rows) explain (costs off) select unique2 from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'; diff --git a/src/test/regress/sql/memoize.sql b/src/test/regress/sql/memoize.sql index c0d47fa875a..d5aab4e5666 100644 --- a/src/test/regress/sql/memoize.sql +++ b/src/test/regress/sql/memoize.sql @@ -23,9 +23,8 @@ begin ln := regexp_replace(ln, 'Evictions: 0', 'Evictions: Zero'); ln := regexp_replace(ln, 'Evictions: \d+', 'Evictions: N'); ln := regexp_replace(ln, 'Memory Usage: \d+', 'Memory Usage: N'); - ln := regexp_replace(ln, 'Heap Fetches: \d+', 'Heap Fetches: N'); - ln := regexp_replace(ln, 'loops=\d+', 'loops=N'); - ln := regexp_replace(ln, 'Index Searches: \d+', 'Index Searches: N'); + ln := regexp_replace(ln, 'Heap Fetches: \d+', 'Heap Fetches: N'); + ln := regexp_replace(ln, 'loops=\d+', 'loops=N'); return next ln; end loop; end; diff --git a/src/test/regress/sql/partition_prune.sql b/src/test/regress/sql/partition_prune.sql index 4a2c74b0899..5f36d589b6b 100644 --- a/src/test/regress/sql/partition_prune.sql +++ b/src/test/regress/sql/partition_prune.sql @@ -588,10 +588,6 @@ begin ln := regexp_replace(ln, 'Workers Launched: \d+', 'Workers Launched: N'); ln := regexp_replace(ln, 'actual rows=\d+(?:\.\d+)? loops=\d+', 'actual rows=N loops=N'); ln := regexp_replace(ln, 'Rows Removed by Filter: \d+', 'Rows Removed by Filter: N'); - perform regexp_matches(ln, 'Index Searches: \d+'); - if found then - continue; - end if; return next ln; end loop; end; |