Re: explain analyze reports that my queries are fast but they run very slowly - Mailing list pgsql-performance

From Tom Lane
Subject Re: explain analyze reports that my queries are fast but they run very slowly
Date
Msg-id 17694.1356637368@sss.pgh.pa.us
Whole thread Raw
In response to Re: explain analyze reports that my queries are fast but they run very slowly  (Nikolas Everett <nik9000@gmail.com>)
List 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 by date:

Previous
From: Nikolas Everett
Date:
Subject: Re: explain analyze reports that my queries are fast but they run very slowly
Next
From: Emmanuel Cecchet
Date:
Subject: Re: Performance on Bulk Insert to Partitioned Table