Re: [ADMIN] poor performance in migrated database

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [ADMIN] poor performance in migrated database
Дата
Msg-id 12047.1099958278@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [ADMIN] poor performance in migrated database  (Carlos Lopez <chlopezl@yahoo.com>)
Ответы Re: [ADMIN] poor performance in migrated database
Список pgsql-performance
Carlos Lopez <chlopezl@yahoo.com> writes:
> This is one of the queries that work,and is the first
> in a 4 level nested query....

Do you really need UNION (as opposed to UNION ALL) in this query?
The EXPLAIN shows that almost half the runtime is going into the
sort/uniq to eliminate duplicates ... and according to the row
counts, there are no duplicates, so it's wasted effort.

I looked at your schema and saw an awful lot of SELECT DISTINCTs
that looked like they might not be necessary, too.  But I'm not
willing to crawl through 144 views with no information about
which ones are causing you problems.  What's a typical query
that you are unsatisfied with the performance of?

            regards, tom lane

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

Предыдущее
От: patrick ~
Дата:
Сообщение: Re: vacuum analyze slows sql query
Следующее
От: John Meinel
Дата:
Сообщение: Re: vacuum analyze slows sql query