Re: Order by (for 15 rows) adds 30 seconds to query time

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Order by (for 15 rows) adds 30 seconds to query time
Дата
Msg-id 4B166FCA.50507@postnewspapers.com.au
обсуждение исходный текст
Ответ на Re: Order by (for 15 rows) adds 30 seconds to query time  (Matthew Wakeling <matthew@flymine.org>)
Ответы Re: Order by (for 15 rows) adds 30 seconds to query time  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-performance
On 2/12/2009 7:08 PM, Matthew Wakeling wrote:
> On Tue, 1 Dec 2009, Jean-Michel Pouré wrote:
>> PostgreSQL query analyzer needs to run a couple of times before it can
>> rewrite and optimize the query. Make sure demand_id, id and join IDs
>> carry indexes.
>
> Huh? At what point does the planner carry over previous plans and use
> them to further optimise the query?
>
> But perhaps the biggest factor here is calling a five table join a
> "pretty simple query".

Some of those tables are views composed of multiple unions, too, by the
looks of things.

Doesn't the planner have some ... issues ... with estimation of row
counts on joins over unions? Or is my memory just more faulty than usual?

--
Craig Ringer

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

Предыдущее
От: Laurent Laborde
Дата:
Сообщение: Re: Cost of sort/order by not estimated by the query planner
Следующее
От: Laurent Laborde
Дата:
Сообщение: Re: Cost of sort/order by not estimated by the query planner