logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: How to track down inconsistent performance?: msg#00963

Subject: Re: How to track down inconsistent performance?
Ron Snyder <snyder@xxxxxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
message can get through to the mailing list cleanly



<Prev in Thread] Current Thread [Next in Thread>