- Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathoid.sql
23 lines (17 loc) · 727 Bytes
/
oid.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
set enable_seqscan=off;
CREATETABLEtest_oid (
i oid
);
INSERT INTO test_oid VALUES (0),(1),(2),(3),(4),(5);
CREATEINDEXidx_oidON test_oid USING rum (i);
SELECT*FROM test_oid WHERE i<3::oidORDER BY i;
SELECT*FROM test_oid WHERE i<=3::oidORDER BY i;
SELECT*FROM test_oid WHERE i=3::oidORDER BY i;
SELECT*FROM test_oid WHERE i>=3::oidORDER BY i;
SELECT*FROM test_oid WHERE i>3::oidORDER BY i;
EXPLAIN (costs off)
SELECT*, i <=>0::oidFROM test_oid ORDER BY i <=>0::oid;
SELECT*, i <=>0::oidFROM test_oid ORDER BY i <=>0::oid;
EXPLAIN (costs off)
SELECT*, i <=>1::oidFROM test_oid WHERE i<1::oidORDER BY i <=>1::oid;
SELECT*, i <=>1::oidFROM test_oid WHERE i<1::oidORDER BY i <=>1::oid;