[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-general
Subject: [GENERAL] How do I index to speed up OVERLAPS?
From: Matthew Wilson <matt () tplus1 ! com>
Date: 2008-11-29 21:18:28
Message-ID: slrngj3cd4.b3g.matt () sprout ! tplus1 ! com
[Download RAW message or body]
I have a table shift with a start_time column and a stop_time column and
I do a lot of queries like:
select * from shift
where (start_time, stop_time) overlaps ($A, $B);
$A and $B are user-submitted values.
Anyhow, how do I put indexes on my table to make these queries run
faster?
Also, is there a better data type to use for ranges of time?
TIA
Matt
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic