Re: [GENERAL] Slow query using LIMIT [SOLVED]

2005-09-27 Thread Poul Møller Hansen
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)---

Re: [GENERAL] Slow query using LIMIT

2005-09-27 Thread Yonatan Ben-Nes
Poul Møller Hansen wrote: 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 takes 1,3 sec. with this result: Sort (cost=52971.52..53033.26 rows=24693 width=93) (actual time=1141.002..1252.9

[GENERAL] Slow query using LIMIT

2005-09-27 Thread Poul Møller Hansen
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 takes 1,3 sec. with this result: Sort (cost=52971.52..53033.26 rows=24693 width=93) (actual time=1141.002..1252.995 rows=25109 loops=1) S