Re: Too slow querying a table of 15 million records - Mailing list pgsql-performance

From Christopher Kings-Lynne
Subject Re: Too slow querying a table of 15 million records
Date
Msg-id 42C10F62.8030703@familyhealth.com.au
Whole thread Raw
In response to Too slow querying a table of 15 million records  (kjelle@bingon.no)
List 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


pgsql-performance by date:

Previous
From: Jacques Caron
Date:
Subject: Re: Insert performance vs Table size
Next
From: "Merlin Moncure"
Date:
Subject: tricky query