mirror of
https://github.com/postgres/postgres.git
synced 2025-04-21 12:05:57 +03:00
Ensure plan stability in contrib/btree_gist regression test.
Buildfarm member skink failed with symptoms suggesting that an auto-analyze had happened and changed the plan displayed for a test query. Although this is evidently of low probability, regression tests that sometimes fail are no fun, so add commands to force a bitmap scan to be chosen.
This commit is contained in:
parent
6e6e4f1659
commit
a2c1bc36da
@ -9,6 +9,7 @@ INSERT INTO test_ne SELECT '2009-01-01', 10.7 FROM generate_series(1,1000);
|
|||||||
INSERT INTO test_ne VALUES('2007-02-03', -91.3);
|
INSERT INTO test_ne VALUES('2007-02-03', -91.3);
|
||||||
INSERT INTO test_ne VALUES('2011-09-01', 43.7);
|
INSERT INTO test_ne VALUES('2011-09-01', 43.7);
|
||||||
INSERT INTO test_ne SELECT '2009-01-01', 10.7 FROM generate_series(1,1000);
|
INSERT INTO test_ne SELECT '2009-01-01', 10.7 FROM generate_series(1,1000);
|
||||||
|
SET enable_indexscan to false;
|
||||||
EXPLAIN (COSTS OFF) SELECT * FROM test_ne WHERE a <> '2009-01-01' AND b <> 10.7;
|
EXPLAIN (COSTS OFF) SELECT * FROM test_ne WHERE a <> '2009-01-01' AND b <> 10.7;
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------
|
||||||
@ -25,6 +26,7 @@ SELECT * FROM test_ne WHERE a <> '2009-01-01' AND b <> 10.7;
|
|||||||
Thu Sep 01 00:00:00 2011 | 43.7
|
Thu Sep 01 00:00:00 2011 | 43.7
|
||||||
(2 rows)
|
(2 rows)
|
||||||
|
|
||||||
|
RESET enable_indexscan;
|
||||||
-- test search for "not equals" using an exclusion constraint
|
-- test search for "not equals" using an exclusion constraint
|
||||||
CREATE TABLE zoo (
|
CREATE TABLE zoo (
|
||||||
cage INTEGER,
|
cage INTEGER,
|
||||||
|
@ -14,10 +14,14 @@ INSERT INTO test_ne VALUES('2007-02-03', -91.3);
|
|||||||
INSERT INTO test_ne VALUES('2011-09-01', 43.7);
|
INSERT INTO test_ne VALUES('2011-09-01', 43.7);
|
||||||
INSERT INTO test_ne SELECT '2009-01-01', 10.7 FROM generate_series(1,1000);
|
INSERT INTO test_ne SELECT '2009-01-01', 10.7 FROM generate_series(1,1000);
|
||||||
|
|
||||||
|
SET enable_indexscan to false;
|
||||||
|
|
||||||
EXPLAIN (COSTS OFF) SELECT * FROM test_ne WHERE a <> '2009-01-01' AND b <> 10.7;
|
EXPLAIN (COSTS OFF) SELECT * FROM test_ne WHERE a <> '2009-01-01' AND b <> 10.7;
|
||||||
|
|
||||||
SELECT * FROM test_ne WHERE a <> '2009-01-01' AND b <> 10.7;
|
SELECT * FROM test_ne WHERE a <> '2009-01-01' AND b <> 10.7;
|
||||||
|
|
||||||
|
RESET enable_indexscan;
|
||||||
|
|
||||||
-- test search for "not equals" using an exclusion constraint
|
-- test search for "not equals" using an exclusion constraint
|
||||||
|
|
||||||
CREATE TABLE zoo (
|
CREATE TABLE zoo (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user