Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1ToJLz-0000yP-PN for pgsql-performance@arkaria.postgresql.org; Thu, 27 Dec 2012 19:42:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1ToJLy-0004fv-F4 for pgsql-performance@arkaria.postgresql.org; Thu, 27 Dec 2012 19:42:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1ToJLx-0004fp-DY for pgsql-performance@postgresql.org; Thu, 27 Dec 2012 19:42:53 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1ToJLu-0003jT-3x for pgsql-performance@postgresql.org; Thu, 27 Dec 2012 19:42:53 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id qBRJgmr8017695; Thu, 27 Dec 2012 14:42:48 -0500 (EST) From: Tom Lane To: Nikolas Everett cc: "pgsql-performance@postgresql.org" Subject: Re: explain analyze reports that my queries are fast but they run very slowly In-reply-to: References: <17229.1356636060@sss.pgh.pa.us> Comments: In-reply-to Nikolas Everett message dated "Thu, 27 Dec 2012 14:28:11 -0500" Date: Thu, 27 Dec 2012 14:42:48 -0500 Message-ID: <17694.1356637368@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Nikolas Everett 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 -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance