Re: explain analyze reports that my queries are fast but they run very slowly

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: explain analyze reports that my queries are fast but they run very slowly
Дата
Msg-id 17694.1356637368@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: explain analyze reports that my queries are fast but they run very slowly  (Nikolas Everett <nik9000@gmail.com>)
Список pgsql-performance
Nikolas Everett <nik9000@gmail.com> writes:
> After more digging it looks like this table has an inordinate number
> of indices (10 ish).

10 doesn't sound like a lot.

> There a whole buch of conditional indicies for other
> columns that we're not checking.  The particular column that is causing us
> trouble exists in both a regular (con_id) and a composite index (con_id,
> somthing_else).

You're not being at all clear here.  Are you trying to say that only
queries involving "WHERE col = constant" for a particular column seem
to be slow?  If so, maybe the column has a weird datatype or a wildly
out of line statistics target?  (Still hard to see how you get to 11-ish
seconds in planning, though.)

One thing you might do is watch the backend process in "top" or local
equivalent, and see if it's spending most of the 11 seconds sleeping, or
accumulating CPU time, or accumulating I/O.  That info would eliminate
a lot of possibilities.

            regards, tom lane


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

Предыдущее
От: Nikolas Everett
Дата:
Сообщение: Re: explain analyze reports that my queries are fast but they run very slowly
Следующее
От: Emmanuel Cecchet
Дата:
Сообщение: Re: Performance on Bulk Insert to Partitioned Table