Home > Archive > PostgreSQL Discussion > September 2005 > Re: Slow query using LIMIT [SOLVED]









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Slow query using LIMIT [SOLVED]
Poul Møller Hansen

2005-09-27, 11:23 am


> Doing the following query:
> explain analyze SELECT * FROM my.tablename WHERE node = '1234567890'
> AND date BETWEEN '2005-03-27' AND NOW() ORDER BY id DESC


ORDER BY node,id is forcing the planner to use the right index.

Thanks,
Poul


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com