vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| [kjelle@bingon.no - Tue at 08:33:58PM +0200] > I use FreeBSD 4.11 with PostGreSQL 7.3.8. (...) > 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 ; I haven't looked through all your email yet, but this phenomena have been up at the list a couple of times. Try replacing "now() - interval '24 hours'" with a fixed time stamp, and see if it helps. pg7 will plan the query without knowledge of what "now() - interval '24 hours'" will compute to. This should be fixed in pg8. -- Tobias Brox, +86-13521622905 Nordicbet, IT dept ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly |
| ||||
| Tobias Brox wrote: >[kjelle@bingon.no - Tue at 08:33:58PM +0200] > > >>I use FreeBSD 4.11 with PostGreSQL 7.3.8. >> >> >(...) > > >>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 ; >> >> > >I haven't looked through all your email yet, but this phenomena have been up >at the list a couple of times. Try replacing "now() - interval '24 hours'" >with a fixed time stamp, and see if it helps. > >pg7 will plan the query without knowledge of what "now() - interval '24 >hours'" will compute to. This should be fixed in pg8. > > > The grandparent was a mailing list double send. Notice the date is 1 week ago. It has already been answered (though your answer is still correct). John =:-> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Cygwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCwO+bJdeBCYSNAAMRAi1CAKDWsx+D5csdT6oEtuRyeu TB/fhsqACfbGto JR4yWVJ4QQmfzHOfqqns+q0= =trN6 -----END PGP SIGNATURE----- |