From: Tomas Vondra Date: Thu, 4 May 2017 20:32:13 +0000 (+0200) Subject: Remove cost estimates from the final EXPLAIN in join test suite X-Git-Tag: XL_10_R1BETA1~341 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=ea6c3c576bb7afb8dcc4f86ab99c8b88e71b6eb9;p=postgres-xl.git Remove cost estimates from the final EXPLAIN in join test suite While this was not causing any failures at the moment, regression tests should not rely on cost estimates being constant. So change the last EXPLAIN in join test suite to use COSTS OFF. --- diff --git a/src/test/regress/expected/join.out b/src/test/regress/expected/join.out index e8cfe45bf4..0ff949c272 100644 --- a/src/test/regress/expected/join.out +++ b/src/test/regress/expected/join.out @@ -5618,28 +5618,28 @@ CREATE TABLE testh (a int, b int); INSERT INTO testh SELECT generate_series(1, 10000), generate_series(8001, 18000); set enable_mergejoin TO false; set enable_hashjoin TO false; -EXPLAIN VERBOSE SELECT count(*) FROM testr WHERE NOT EXISTS (SELECT * FROM testh WHERE testr.b = testh.b); - QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- - Finalize Aggregate (cost=41732.22..41732.23 rows=1 width=8) +EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM testr WHERE NOT EXISTS (SELECT * FROM testh WHERE testr.b = testh.b); + QUERY PLAN +----------------------------------------------------------------------------------- + Finalize Aggregate Output: count(*) - -> Remote Subquery Scan on all (datanode_1,datanode_2) (cost=41732.20..41732.22 rows=1 width=8) + -> Remote Subquery Scan on all (datanode_1,datanode_2) Output: PARTIAL count(*) - -> Partial Aggregate (cost=41632.20..41632.21 rows=1 width=8) + -> Partial Aggregate Output: PARTIAL count(*) - -> Nested Loop Anti Join (cost=0.00..41629.38 rows=1130 width=0) + -> Nested Loop Anti Join Join Filter: (testr.b = testh.b) - -> Remote Subquery Scan on all (datanode_1) (cost=100.00..152.94 rows=2260 width=4) + -> Remote Subquery Scan on all (datanode_1) Output: testr.b Distribute results by H: b - -> Seq Scan on public.testr (cost=0.00..32.60 rows=2260 width=4) + -> Seq Scan on public.testr Output: testr.b - -> Materialize (cost=100.00..164.24 rows=2260 width=4) + -> Materialize Output: testh.b - -> Remote Subquery Scan on all (datanode_1,datanode_2) (cost=100.00..152.94 rows=2260 width=4) + -> Remote Subquery Scan on all (datanode_1,datanode_2) Output: testh.b Distribute results by H: b - -> Seq Scan on public.testh (cost=0.00..32.60 rows=2260 width=4) + -> Seq Scan on public.testh Output: testh.b (20 rows) diff --git a/src/test/regress/sql/join.sql b/src/test/regress/sql/join.sql index fadda1411a..a28e44c844 100644 --- a/src/test/regress/sql/join.sql +++ b/src/test/regress/sql/join.sql @@ -1783,5 +1783,5 @@ CREATE TABLE testh (a int, b int); INSERT INTO testh SELECT generate_series(1, 10000), generate_series(8001, 18000); set enable_mergejoin TO false; set enable_hashjoin TO false; -EXPLAIN VERBOSE SELECT count(*) FROM testr WHERE NOT EXISTS (SELECT * FROM testh WHERE testr.b = testh.b); +EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM testr WHERE NOT EXISTS (SELECT * FROM testh WHERE testr.b = testh.b); SELECT count(*) FROM testr WHERE NOT EXISTS (SELECT * FROM testh WHERE testr.b = testh.b);