Re: Slow query using LIMIT [SOLVED]

From: Poul Møller Hansen <freebsd(at)pbnet(dot)dk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Slow query using LIMIT [SOLVED]
Date: 2005-09-27 14:16:14
Message-ID: 4339542E.1020605@pbnet.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-09-27 14:45:44 Re: Extraordinarily slow!!
Previous Message boinger 2005-09-27 14:07:41 Re: Performance woes relating to DISTINCT (I think)