Re: Glacially slow nested SELECT

Поиск
Список
Период
Сортировка
От Demitri Muna
Тема Re: Glacially slow nested SELECT
Дата
Msg-id D2060C04-C14D-43DD-A3DD-28C8E1352F1D@mac.com
обсуждение исходный текст
Ответ на Re: Glacially slow nested SELECT  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Glacially slow nested SELECT  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On 15 Jan 2007, at 16:21, Tom Lane wrote:

> thatsanicehatyouhave@mac.com writes:
>> I have a query that is extraordinarily slow but I don't know why.
>
> It looks like spview is a view with an embedded ORDER BY?  IIRC that
> prevents any meaningful optimization of joins to it --- and
> WHERE-IN-sub-SELECT is a kind of join.

Thanks for the pointer Tom; removing the ORDER BY from the view did
the trick. Is there a reason that the sorting can't be done after the
selection? I suppose I can solve this with a function.

Cheers,

Demitri



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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: [HACKERS] Checkpoint request failed on version 8.2.1.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Checkpoint request failed on version 8.2.1.