This is a discussion on Re: Too slow querying a table of 15 million records within the Pgsql Performance forums, part of the PostgreSQL category; --> > database=> explain select date_trunc('hour', time),count(*) as total from > test where p1=53 and time > now() - interval ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| > 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 ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings |