"Paul McKay" <paul_mckay@clearwater-it.co.uk> writes:
> The query I am executing is
> Select time,value
> From measurement
> Where assessment = ?
> And time between ? and ?
EXPLAIN ANALYZE would help you investigate this. Is it using an
indexscan? On which index? Does forcing use of the other index
(by temporarily dropping the preferred one) improve matters?
Possibly a two-column index on both assessment and time would be
an improvement, but it's hard to guess without knowing anything
about the selectivity of the two WHERE clauses.
regards, tom lane