mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Add sortsupport for gist_btree opclasses, for faster index builds.
Commit 16fa9b2b30
introduced a faster way to build GiST indexes, by
sorting all the data. This commit adds the sortsupport functions needed
to make use of that feature for btree_gist.
Author: Andrey Borodin
Discussion: https://www.postgresql.org/message-id/2F3F7265-0D22-44DB-AD71-8554C743D943@yandex-team.ru
This commit is contained in:
@ -32,7 +32,14 @@ SELECT count(*) FROM bittmp WHERE a > '011011000100010111011000110000100';
|
||||
350
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX bitidx ON bittmp USING GIST ( a );
|
||||
DEBUG: building index "bitidx" on table "bittmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX bitidx_b ON bittmp USING GIST ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "bitidx_b" on table "bittmp" serially
|
||||
DROP INDEX bitidx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM bittmp WHERE a < '011011000100010111011000110000100';
|
||||
count
|
||||
|
@ -33,7 +33,14 @@ SELECT count(*) FROM byteatmp WHERE a > '31b0';
|
||||
400
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX byteaidx ON byteatmp USING GIST ( a );
|
||||
DEBUG: building index "byteaidx" on table "byteatmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX byteaidx_b ON byteatmp USING GIST ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "byteaidx_b" on table "byteatmp" serially
|
||||
DROP INDEX byteaidx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM byteatmp WHERE a < '31b0'::bytea;
|
||||
count
|
||||
|
@ -40,7 +40,14 @@ SELECT a, a <-> '21472.79' FROM moneytmp ORDER BY a <-> '21472.79' LIMIT 3;
|
||||
$21,915.01 | $442.22
|
||||
(3 rows)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX moneyidx ON moneytmp USING gist ( a );
|
||||
DEBUG: building index "moneyidx" on table "moneytmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX moneyidx_b ON moneytmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "moneyidx_b" on table "moneytmp" serially
|
||||
DROP INDEX moneyidx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM moneytmp WHERE a < '22649.64'::money;
|
||||
count
|
||||
|
@ -32,7 +32,14 @@ SELECT count(*) FROM chartmp WHERE a > '31b0'::char(32);
|
||||
400
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX charidx ON chartmp USING GIST ( a );
|
||||
DEBUG: building index "charidx" on table "chartmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX charidx_b ON chartmp USING GIST ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "charidx_b" on table "chartmp" serially
|
||||
DROP INDEX charidx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM chartmp WHERE a < '31b0'::char(32);
|
||||
count
|
||||
|
@ -32,7 +32,14 @@ SELECT count(*) FROM cidrtmp WHERE a > '121.111.63.82';
|
||||
309
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX cidridx ON cidrtmp USING gist ( a );
|
||||
DEBUG: building index "cidridx" on table "cidrtmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX cidridx_b ON cidrtmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "cidridx_b" on table "cidrtmp" serially
|
||||
DROP INDEX cidridx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM cidrtmp WHERE a < '121.111.63.82'::cidr;
|
||||
count
|
||||
|
@ -40,7 +40,14 @@ SELECT a, a <-> '2001-02-13' FROM datetmp ORDER BY a <-> '2001-02-13' LIMIT 3;
|
||||
03-24-2001 | 39
|
||||
(3 rows)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX dateidx ON datetmp USING gist ( a );
|
||||
DEBUG: building index "dateidx" on table "datetmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX dateidx_b ON datetmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "dateidx_b" on table "datetmp" serially
|
||||
DROP INDEX dateidx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM datetmp WHERE a < '2001-02-13'::date;
|
||||
count
|
||||
|
@ -46,7 +46,14 @@ SELECT count(*) FROM enumtmp WHERE a > 'g'::rainbow;
|
||||
230
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX enumidx ON enumtmp USING gist ( a );
|
||||
DEBUG: building index "enumidx" on table "enumtmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX enumidx_b ON enumtmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "enumidx_b" on table "enumtmp" serially
|
||||
DROP INDEX enumidx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM enumtmp WHERE a < 'g'::rainbow;
|
||||
count
|
||||
|
@ -40,7 +40,14 @@ SELECT a, a <-> '-179.0' FROM float4tmp ORDER BY a <-> '-179.0' LIMIT 3;
|
||||
-158.17741 | 20.822586
|
||||
(3 rows)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX float4idx ON float4tmp USING gist ( a );
|
||||
DEBUG: building index "float4idx" on table "float4tmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX float4idx_b ON float4tmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "float4idx_b" on table "float4tmp" serially
|
||||
DROP INDEX float4idx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM float4tmp WHERE a < -179.0::float4;
|
||||
count
|
||||
|
@ -40,7 +40,14 @@ SELECT a, a <-> '-1890.0' FROM float8tmp ORDER BY a <-> '-1890.0' LIMIT 3;
|
||||
-1769.73634 | 120.26366000000007
|
||||
(3 rows)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX float8idx ON float8tmp USING gist ( a );
|
||||
DEBUG: building index "float8idx" on table "float8tmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX float8idx_b ON float8tmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "float8idx_b" on table "float8tmp" serially
|
||||
DROP INDEX float8idx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM float8tmp WHERE a < -1890.0::float8;
|
||||
count
|
||||
|
@ -32,7 +32,14 @@ SELECT count(*) FROM inettmp WHERE a > '89.225.196.191';
|
||||
386
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX inetidx ON inettmp USING gist ( a );
|
||||
DEBUG: building index "inetidx" on table "inettmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX inetidx_b ON inettmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "inetidx_b" on table "inettmp" serially
|
||||
DROP INDEX inetidx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM inettmp WHERE a < '89.225.196.191'::inet;
|
||||
count
|
||||
|
@ -40,7 +40,14 @@ SELECT a, a <-> '237' FROM int2tmp ORDER BY a <-> '237' LIMIT 3;
|
||||
228 | 9
|
||||
(3 rows)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX int2idx ON int2tmp USING gist ( a );
|
||||
DEBUG: building index "int2idx" on table "int2tmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX int2idx_b ON int2tmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "int2idx_b" on table "int2tmp" serially
|
||||
DROP INDEX int2idx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM int2tmp WHERE a < 237::int2;
|
||||
count
|
||||
|
@ -40,7 +40,14 @@ SELECT a, a <-> '237' FROM int4tmp ORDER BY a <-> '237' LIMIT 3;
|
||||
228 | 9
|
||||
(3 rows)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX int4idx ON int4tmp USING gist ( a );
|
||||
DEBUG: building index "int4idx" on table "int4tmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX int4idx_b ON int4tmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "int4idx_b" on table "int4tmp" serially
|
||||
DROP INDEX int4idx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM int4tmp WHERE a < 237::int4;
|
||||
count
|
||||
|
@ -40,7 +40,14 @@ SELECT a, a <-> '464571291354841' FROM int8tmp ORDER BY a <-> '464571291354841'
|
||||
478227196042750 | 13655904687909
|
||||
(3 rows)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX int8idx ON int8tmp USING gist ( a );
|
||||
DEBUG: building index "int8idx" on table "int8tmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX int8idx_b ON int8tmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "int8idx_b" on table "int8tmp" serially
|
||||
DROP INDEX int8idx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM int8tmp WHERE a < 464571291354841::int8;
|
||||
count
|
||||
|
@ -40,7 +40,14 @@ SELECT a, a <-> '199 days 21:21:23' FROM intervaltmp ORDER BY a <-> '199 days 21
|
||||
@ 220 days 19 hours 5 mins 42 secs | @ 21 days -2 hours -15 mins -41 secs
|
||||
(3 rows)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX intervalidx ON intervaltmp USING gist ( a );
|
||||
DEBUG: building index "intervalidx" on table "intervaltmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX intervalidx_b ON intervaltmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "intervalidx_b" on table "intervaltmp" serially
|
||||
DROP INDEX intervalidx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM intervaltmp WHERE a < '199 days 21:21:23'::interval;
|
||||
count
|
||||
|
@ -32,7 +32,14 @@ SELECT count(*) FROM macaddrtmp WHERE a > '22:00:5c:e5:9b:0d';
|
||||
540
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX macaddridx ON macaddrtmp USING gist ( a );
|
||||
DEBUG: building index "macaddridx" on table "macaddrtmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX macaddridx_b ON macaddrtmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "macaddridx_b" on table "macaddrtmp" serially
|
||||
DROP INDEX macaddridx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM macaddrtmp WHERE a < '22:00:5c:e5:9b:0d'::macaddr;
|
||||
count
|
||||
|
@ -32,7 +32,14 @@ SELECT count(*) FROM macaddr8tmp WHERE a > '22:00:5c:e5:9b:0d';
|
||||
540
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX macaddr8idx ON macaddr8tmp USING gist ( a );
|
||||
DEBUG: building index "macaddr8idx" on table "macaddr8tmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX macaddr8idx_b ON macaddr8tmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "macaddr8idx_b" on table "macaddr8tmp" serially
|
||||
DROP INDEX macaddr8idx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM macaddr8tmp WHERE a < '22:00:5c:e5:9b:0d'::macaddr8;
|
||||
count
|
||||
|
@ -94,7 +94,14 @@ SELECT count(*) FROM numerictmp WHERE a > 0 ;
|
||||
576
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX numericidx ON numerictmp USING gist ( a );
|
||||
DEBUG: building index "numericidx" on table "numerictmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX numericidx_b ON numerictmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "numericidx_b" on table "numerictmp" serially
|
||||
DROP INDEX numericidx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM numerictmp WHERE a < -1890.0;
|
||||
count
|
||||
|
@ -32,7 +32,14 @@ SELECT count(*) FROM oidtmp WHERE oid > 17;
|
||||
983
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX oididx ON oidtmp USING gist ( oid );
|
||||
DEBUG: building index "oididx" on table "oidtmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX oididx_b ON oidtmp USING gist ( oid ) WITH (buffering=on);
|
||||
DEBUG: building index "oididx_b" on table "oidtmp" serially
|
||||
DROP INDEX oididx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM oidtmp WHERE oid < 17;
|
||||
count
|
||||
|
@ -33,7 +33,14 @@ SELECT count(*) FROM texttmp WHERE a > '31b0';
|
||||
400
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX textidx ON texttmp USING GIST ( a );
|
||||
DEBUG: building index "textidx" on table "texttmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX textidx_b ON texttmp USING GIST ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "textidx_b" on table "texttmp" serially
|
||||
DROP INDEX textidx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM texttmp WHERE a < '31b0'::text;
|
||||
count
|
||||
|
@ -40,7 +40,14 @@ SELECT a, a <-> '10:57:11' FROM timetmp ORDER BY a <-> '10:57:11' LIMIT 3;
|
||||
10:55:32 | @ 1 min 39 secs
|
||||
(3 rows)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX timeidx ON timetmp USING gist ( a );
|
||||
DEBUG: building index "timeidx" on table "timetmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX timeidx_b ON timetmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "timeidx_b" on table "timetmp" serially
|
||||
DROP INDEX timeidx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM timetmp WHERE a < '10:57:11'::time;
|
||||
count
|
||||
|
@ -40,7 +40,14 @@ SELECT a, a <-> '2004-10-26 08:55:08' FROM timestamptmp ORDER BY a <-> '2004-10-
|
||||
Mon Nov 29 20:12:43 2004 | @ 34 days 11 hours 17 mins 35 secs
|
||||
(3 rows)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX timestampidx ON timestamptmp USING gist ( a );
|
||||
DEBUG: building index "timestampidx" on table "timestamptmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX timestampidx_b ON timestamptmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "timestampidx_b" on table "timestamptmp" serially
|
||||
DROP INDEX timestampidx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM timestamptmp WHERE a < '2004-10-26 08:55:08'::timestamp;
|
||||
count
|
||||
|
@ -100,7 +100,14 @@ SELECT a, a <-> '2018-12-18 10:59:54 GMT+2' FROM timestamptztmp ORDER BY a <-> '
|
||||
Thu Jan 24 12:28:12 2019 PST | @ 37 days 7 hours 28 mins 18 secs
|
||||
(3 rows)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX timestamptzidx ON timestamptztmp USING gist ( a );
|
||||
DEBUG: building index "timestamptzidx" on table "timestamptztmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX timestamptzidx_b ON timestamptztmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "timestamptzidx_b" on table "timestamptztmp" serially
|
||||
DROP INDEX timestamptzidx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM timestamptztmp WHERE a < '2018-12-18 10:59:54 GMT+3'::timestamptz;
|
||||
count
|
||||
|
@ -18,7 +18,14 @@ INSERT INTO timetzcmp (r_id,a) SELECT 22,count(*) FROM timetztmp WHERE a <= '07:
|
||||
INSERT INTO timetzcmp (r_id,a) SELECT 23,count(*) FROM timetztmp WHERE a = '07:46:45 GMT+4';
|
||||
INSERT INTO timetzcmp (r_id,a) SELECT 24,count(*) FROM timetztmp WHERE a >= '07:46:45 GMT+4';
|
||||
INSERT INTO timetzcmp (r_id,a) SELECT 25,count(*) FROM timetztmp WHERE a > '07:46:45 GMT+4';
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX timetzidx ON timetztmp USING gist ( a );
|
||||
DEBUG: building index "timetzidx" on table "timetztmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX timetzidx_b ON timetztmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "timetzidx_b" on table "timetztmp" serially
|
||||
DROP INDEX timetzidx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a < '07:46:45 GMT+3'::timetz ) q WHERE r_id=1 ;
|
||||
UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a <= '07:46:45 GMT+3'::timetz ) q WHERE r_id=2 ;
|
||||
|
@ -32,7 +32,14 @@ SELECT count(*) FROM uuidtmp WHERE a > '55e65ca2-4136-4a4b-ba78-cd3fe4678203';
|
||||
375
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX uuididx ON uuidtmp USING gist ( a );
|
||||
DEBUG: building index "uuididx" on table "uuidtmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX uuididx_b ON uuidtmp USING gist ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "uuididx_b" on table "uuidtmp" serially
|
||||
DROP INDEX uuididx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM uuidtmp WHERE a < '55e65ca2-4136-4a4b-ba78-cd3fe4678203'::uuid;
|
||||
count
|
||||
|
@ -32,7 +32,14 @@ SELECT count(*) FROM varbittmp WHERE a > '1110100111010';
|
||||
50
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX varbitidx ON varbittmp USING GIST ( a );
|
||||
DEBUG: building index "varbitidx" on table "varbittmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX varbitidx_b ON varbittmp USING GIST ( a ) WITH (buffering=on);
|
||||
DEBUG: building index "varbitidx_b" on table "varbittmp" serially
|
||||
DROP INDEX varbitidx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM varbittmp WHERE a < '1110100111010'::varbit;
|
||||
count
|
||||
|
@ -32,7 +32,14 @@ SELECT count(*) FROM vchartmp WHERE a > '31b0'::varchar(32);
|
||||
400
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages = DEBUG1;
|
||||
CREATE INDEX vcharidx ON vchartmp USING GIST ( text(a) );
|
||||
DEBUG: building index "vcharidx" on table "vchartmp" serially
|
||||
DEBUG: using sorted GiST build
|
||||
CREATE INDEX vcharidx_b ON vchartmp USING GIST ( text(a) ) WITH (buffering=on);
|
||||
DEBUG: building index "vcharidx_b" on table "vchartmp" serially
|
||||
DROP INDEX vcharidx_b;
|
||||
RESET client_min_messages;
|
||||
SET enable_seqscan=off;
|
||||
SELECT count(*) FROM vchartmp WHERE a < '31b0'::varchar(32);
|
||||
count
|
||||
|
Reference in New Issue
Block a user