Re: Too slow querying a table of 15 million records

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: kjelle(at)bingon(dot)no
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Too slow querying a table of 15 million records
Date: 2005-06-28 08:50:42
Message-ID: 42C10F62.8030703@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> database=> explain select date_trunc('hour', time),count(*) as total from
> test where p1=53 and time > now() - interval '24 hours' group by
> date_trunc order by date_trunc ;

Try going:

time > '2005-06-28 15:34:00'

ie. put in the time 24 hours ago as a literal constant.

Chris

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Praveen Raja 2005-06-28 09:50:08 Re: Insert performance vs Table size
Previous Message Klint Gore 2005-06-28 08:36:35 Re: How can I speed up this function?