I'm creating a database with PostgreSQL that has an integer field called "delay". All of my queries on this column will be checking if the value of this column is less than or equal to 0, or greater than 0. Is there anything I can do to increase the speed of access on this column? I currently believe that the best I can do is:
CREATE INDEX index_delay ON tablename (delay ASC);
Is this the best that I can do, or is there a more efficient index for this use case?
WHERE delay>0orWHERE delay<=0. – Ben Aug 22 '14 at 21:28SELECT *ing. – Ben Aug 22 '14 at 21:49delayupdated a lot? What percentage of rows hasdelay < 0? Typical query? Table definition? – Erwin Brandstetter Aug 22 '14 at 23:48