Re: SORT performance - slow?

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: SORT performance - slow?
Дата
Msg-id 4DD9982C.6000807@fuzzy.cz
обсуждение исходный текст
Ответ на SORT performance - slow?  ("Strange, John W" <john.w.strange@jpmchase.com>)
Ответы Re: SORT performance - slow?  (Maciek Sakrejda <msakrejda@truviso.com>)
Список pgsql-performance
Dne 19.5.2011 23:13, Strange, John W napsal(a):
> Am I reading this right in that the sort is taking almost 8 seconds?

You're probably reading it wrong. The sort itself takes about 1 ms (just
subtract the numbers in "actual="). If you include all the overhead it
takes about 2.3 seconds (the hash join ends at 12 sec, the sort at 14.3).

Anyway, your real problem is probably stale stats. Run ANALYZE on the
tables referenced in the query, the estimates are very off. All the rows
expect 1 row but are getting 315k of them.

regards
Tomas

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

Предыдущее
От: Robert Klemme
Дата:
Сообщение: Re: Pushing LIMIT into sub-queries of a UNION ALL?
Следующее
От: Aren Cambre
Дата:
Сообщение: Re: Postgres refusing to use >1 core