Re: Wrong plan for subSELECT with GROUP BY

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: Wrong plan for subSELECT with GROUP BY
Дата
Msg-id 20060512191213.GS6201@pervasive.com
обсуждение исходный текст
Ответ на Wrong plan for subSELECT with GROUP BY  (Antal Attila <atesz@ritek.hu>)
Список pgsql-performance
If you wrap the LIMIT select into a subquery in the FROM the planner
might figure it out...

SELECT ...
    FROM (SELECT blah FROM a LIMIT 10)
        LEFT JOIN ...

Unlike some other databases that will spend huge amounts of time on
trying to re-arrange queries and then hope they can effectively cache
query plans, PostgreSQL prefers not to spend cycles on more esoteric
cases so that query planning is fast.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

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

Предыдущее
От: Phil Frost
Дата:
Сообщение: stable function optimizations, revisited
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Firebird 1.5.3 X Postgresql 8.1.3 (linux and windows)