PG folks,
I have 5 Gb table (mostly numerical values) and want to be able to
count sources in a range of values, e.g.:
select count(*) from mytable where x between 1.0 and 2.0;
I have indexed on x and vacuumed.
I notice that these take about 3 minutes on my 450 Xeon Linux box.
A very complicated where clause returning data etc. takes about
the same time.
Is there a way to optimize this type of query?
Thanks!
--M
===========================================================================
Martin Weinberg Phone: (413) 545-3821
Dept. of Physics and Astronomy FAX: (413) 545-2117/0648
530 Graduate Research Tower
University of Massachusetts
Amherst, MA 01003-4525