Re: Tuning/performance question.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Tuning/performance question.
Дата
Msg-id 9442.1064765602@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Tuning/performance question.  (Holger Marzen <holger@marzen.de>)
Список pgsql-general
Holger Marzen <holger@marzen.de> writes:
> But many users compain about PostgreSQL's poor count(*) performance,

I don't think that's relevant here.  Some other DB's have shortcuts for
determining the total number of rows in a single table, that is they can
do "SELECT COUNT(*) FROM a_table" quickly, but David's query is messy
enough that I can't believe anyone can actually do it without forming
the join result.

What I'd ask for is EXPLAIN ANALYZE output.  Usually, if a complex query
is slower than it should be, it's because the planner is picking a bad
plan.  So you need to look at how its estimates diverge from reality.
But plain EXPLAIN doesn't show the reality, only the estimates ...

David, could we see EXPLAIN ANALYZE for the query, and also the table
schemas (psql \d displays would do)?  Also, please take it to
pgsql-performance, it's not really on-topic for pgsql-general.

            regards, tom lane

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Rewriting pg_upgrade (was Re: State of Beta 2)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Rewriting pg_upgrade (was Re: State of Beta 2)