diff options
Diffstat (limited to 'contrib/btree_gist/sql/uuid.sql')
-rw-r--r-- | contrib/btree_gist/sql/uuid.sql | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/btree_gist/sql/uuid.sql b/contrib/btree_gist/sql/uuid.sql new file mode 100644 index 0000000..3f7ad76 --- /dev/null +++ b/contrib/btree_gist/sql/uuid.sql @@ -0,0 +1,31 @@ +-- uuid check + +CREATE TABLE uuidtmp (a uuid); + +\copy uuidtmp from 'data/uuid.data' + +SET enable_seqscan=on; + +SELECT count(*) FROM uuidtmp WHERE a < '55e65ca2-4136-4a4b-ba78-cd3fe4678203'; + +SELECT count(*) FROM uuidtmp WHERE a <= '55e65ca2-4136-4a4b-ba78-cd3fe4678203'; + +SELECT count(*) FROM uuidtmp WHERE a = '55e65ca2-4136-4a4b-ba78-cd3fe4678203'; + +SELECT count(*) FROM uuidtmp WHERE a >= '55e65ca2-4136-4a4b-ba78-cd3fe4678203'; + +SELECT count(*) FROM uuidtmp WHERE a > '55e65ca2-4136-4a4b-ba78-cd3fe4678203'; + +CREATE INDEX uuididx ON uuidtmp USING gist ( a ); + +SET enable_seqscan=off; + +SELECT count(*) FROM uuidtmp WHERE a < '55e65ca2-4136-4a4b-ba78-cd3fe4678203'::uuid; + +SELECT count(*) FROM uuidtmp WHERE a <= '55e65ca2-4136-4a4b-ba78-cd3fe4678203'::uuid; + +SELECT count(*) FROM uuidtmp WHERE a = '55e65ca2-4136-4a4b-ba78-cd3fe4678203'::uuid; + +SELECT count(*) FROM uuidtmp WHERE a >= '55e65ca2-4136-4a4b-ba78-cd3fe4678203'::uuid; + +SELECT count(*) FROM uuidtmp WHERE a > '55e65ca2-4136-4a4b-ba78-cd3fe4678203'::uuid; |