On Thu, Oct 03, 2013 at 04:19:29AM +0000, Samuel Stearns wrote: > Thanks, Claudio. > > I'll have a look at the clustering. > > We have also noticed that the same query with a datetime range of 3 hours (rather than 4 months) runs in just 30 seconds: > > AND datetime <= '2013-10-03 10:03:49' > AND datetime >= '2013-10-03 07:03:49' > Hi Samuel, That is even worse performance relatively. 30s for a 3 hour range equals 28800s for a 4 month (2880 hours) range, or 8 hours. I definitely would consider clustering. Regards, Ken -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance