Re: How to track down inconsistent performance? - Mailing list pgsql-general

From Tom Lane
Subject Re: How to track down inconsistent performance?
Date
Msg-id 20558.1020005932@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to track down inconsistent performance?  (Ron Snyder <snyder@roguewave.com>)
List pgsql-general
Ron Snyder <snyder@roguewave.com> writes:
> 'visible' is a boolean, 'product' is a varchar(30), and there are about 210K
> records in the builds table. (I don't know if it's relevant, but there are
> about 39 distinct product values.

Hmm, a rough guess would suggest that the query will be retrieving about
1/78th of the rows (unless there are statistics you haven't mentioned that
affect that).  I would think that a seqscan would be faster for this.
I would definitely think that the planner would think so --- are you
forcing enable_seqscan off?

Since you're evidently running 7.2, I'd ask for EXPLAIN ANALYZE rather
than just EXPLAIN output.  It'd be even more helpful if you are able
to catch both the fast and slow cases under EXPLAIN ANALYZE.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Compiling 7.2 on Solaris 8: runtime error on libssl.so.0.9.6
Next
From: dorian dorian
Date:
Subject: Re: icps, shmmax and shmall - Shared Memory tuning