Re: Changing location of ORDER BY has large effect on performance, but not results...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Changing location of ORDER BY has large effect on performance, but not results...
Дата
Msg-id 13380.1131115678@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Changing location of ORDER BY has large effect on performance, but not results...  (Jason Turner <lefticus@gmail.com>)
Список pgsql-sql
Jason Turner <lefticus@gmail.com> writes:
> My initial guess is that it is not able to utilize the index on
> foo.tracktitle to sort the result set after foo has been joined with
> other tables.

Well, of course not.  It should be able to do it before, though, and I'm
a bit surprised that you didn't get the same plan from both cases seeing
that the planner knows the first one is cheaper.  Can you provide a
complete self-contained test case?  I'm not interested in trying to
reverse-engineer your table definitions ...
        regards, tom lane


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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: JOIN condition confusion
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: serial in output