1
set enable_seqscan=off;
3
CREATE TABLE test_timestamp (
7
INSERT INTO test_timestamp VALUES
8
( '2004-10-26 03:55:08' ),
9
( '2004-10-26 04:55:08' ),
10
( '2004-10-26 05:55:08' ),
11
( '2004-10-26 08:55:08' ),
12
( '2004-10-26 09:55:08' ),
13
( '2004-10-26 10:55:08' )
16
CREATE INDEX idx_timestamp ON test_timestamp USING gin (i);
18
SELECT * FROM test_timestamp WHERE i<'2004-10-26 08:55:08'::timestamp ORDER BY i;
19
SELECT * FROM test_timestamp WHERE i<='2004-10-26 08:55:08'::timestamp ORDER BY i;
20
SELECT * FROM test_timestamp WHERE i='2004-10-26 08:55:08'::timestamp ORDER BY i;
21
SELECT * FROM test_timestamp WHERE i>='2004-10-26 08:55:08'::timestamp ORDER BY i;
22
SELECT * FROM test_timestamp WHERE i>'2004-10-26 08:55:08'::timestamp ORDER BY i;