Re: increasing LIMIT with ORDER BY changes queryplan (7.4)

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: increasing LIMIT with ORDER BY changes queryplan (7.4)
Дата
Msg-id b42b73150610180642k7b2b36absba73437557233327@mail.gmail.com
обсуждение исходный текст
Ответ на increasing LIMIT with ORDER BY changes queryplan (7.4)  ("Jan Harders" <jan@delinquent.de>)
Список pgsql-general
On 10/18/06, Jan Harders <jan@delinquent.de> wrote:

> and, as guessed, takes forever. tried to ANALYZE the table but no change.
> Anyone got any ideas? I just don't understand why it's sorting the values
> while the index should already be sorted...
>
> Oh, btw, I'm on 7.4 (sarge stable version). Could this behaviour change if I
> just upgrade to 8.1?

yes :-) if you're feeling frisky, bite the bullet and give 8.2 a spin!

> any input is appreciated - it's not a critical project but just a private
> one I'm using to get familiar with postgre.

8.1 is smarter with these types of queries and just faster generally.
if that doesn't help, its down to tweaking statistics, etc...note that
I rarely, if ever, resort to that type of optimization.

merlin

В списке pgsql-general по дате отправления:

Предыдущее
От: "Jan Harders"
Дата:
Сообщение: increasing LIMIT with ORDER BY changes queryplan (7.4)
Следующее
От: "Merlin Moncure"
Дата:
Сообщение: Re: Moving postgres users accounts from one postgres 7.3 to postgres 8.0