- Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathfloat4.sql
23 lines (17 loc) · 816 Bytes
/
float4.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_float4 (
i float4
);
INSERT INTO test_float4 VALUES (-2),(-1),(0),(1),(2),(3);
CREATEINDEXidx_float4ON test_float4 USING rum (i);
SELECT*FROM test_float4 WHERE i<1::float4 ORDER BY i;
SELECT*FROM test_float4 WHERE i<=1::float4 ORDER BY i;
SELECT*FROM test_float4 WHERE i=1::float4 ORDER BY i;
SELECT*FROM test_float4 WHERE i>=1::float4 ORDER BY i;
SELECT*FROM test_float4 WHERE i>1::float4 ORDER BY i;
EXPLAIN (costs off)
SELECT*, i <=>0::float4 FROM test_float4 ORDER BY i <=>0::float4;
SELECT*, i <=>0::float4 FROM test_float4 ORDER BY i <=>0::float4;
EXPLAIN (costs off)
SELECT*, i <=>1::float4 FROM test_float4 WHERE i<1::float4 ORDER BY i <=>1::float4;
SELECT*, i <=>1::float4 FROM test_float4 WHERE i<1::float4 ORDER BY i <=>1::float4;