Skip to content

Commit

Permalink
Adjust index test to new <@ selectivity
Browse files Browse the repository at this point in the history
  • Loading branch information
df7cb committed Oct 6, 2023
1 parent 26303d3 commit 07cfeef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion expected/index.out
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ SELECT count(*) FROM spheretmp4 WHERE l && scircle '<(1,1),0.3>';

-- create idx
CREATE TABLE spheretmp1b AS TABLE spheretmp1;
ANALYZE spheretmp1;
CREATE INDEX aaaidx ON spheretmp1 USING gist ( p );
CREATE INDEX spoint3_idx ON spheretmp1b USING gist (p spoint3);
CREATE INDEX bbbidx ON spheretmp2 USING gist ( c );
Expand Down Expand Up @@ -165,7 +166,6 @@ EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p = spoint '(3.09 , 1
4
(1 row)

SET enable_bitmapscan = ON;
SET enable_indexonlyscan = OFF;
EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p <@ scircle '<(1,1),0.3>';
QUERY PLAN
Expand Down
2 changes: 1 addition & 1 deletion sql/index.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ SELECT count(*) FROM spheretmp4 WHERE l && scircle '<(1,1),0.3>';
-- create idx

CREATE TABLE spheretmp1b AS TABLE spheretmp1;
ANALYZE spheretmp1;

CREATE INDEX aaaidx ON spheretmp1 USING gist ( p );

Expand Down Expand Up @@ -69,7 +70,6 @@ EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p <@ scircle '<(1,1),
EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p = spoint '(3.09 , 1.25)';
SELECT count(*) FROM spheretmp1b WHERE p = spoint '(3.09 , 1.25)';

SET enable_bitmapscan = ON;
SET enable_indexonlyscan = OFF;

EXPLAIN (COSTS OFF) SELECT count(*) FROM spheretmp1b WHERE p <@ scircle '<(1,1),0.3>';
Expand Down

0 comments on commit 07cfeef

Please sign in to comment.