3 CREATE TABLE timestamptmp (a timestamp);
5 \copy timestamptmp from 'data/timestamp.data'
9 SELECT count(*) FROM timestamptmp WHERE a < '2004-10-26 08:55:08';
11 SELECT count(*) FROM timestamptmp WHERE a <= '2004-10-26 08:55:08';
13 SELECT count(*) FROM timestamptmp WHERE a = '2004-10-26 08:55:08';
15 SELECT count(*) FROM timestamptmp WHERE a >= '2004-10-26 08:55:08';
17 SELECT count(*) FROM timestamptmp WHERE a > '2004-10-26 08:55:08';
19 CREATE INDEX timestampidx ON timestamptmp USING gist ( a );
21 SET enable_seqscan=off;
23 SELECT count(*) FROM timestamptmp WHERE a < '2004-10-26 08:55:08'::timestamp;
25 SELECT count(*) FROM timestamptmp WHERE a <= '2004-10-26 08:55:08'::timestamp;
27 SELECT count(*) FROM timestamptmp WHERE a = '2004-10-26 08:55:08'::timestamp;
29 SELECT count(*) FROM timestamptmp WHERE a >= '2004-10-26 08:55:08'::timestamp;
31 SELECT count(*) FROM timestamptmp WHERE a > '2004-10-26 08:55:08'::timestamp;