pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kyle Cordes <kyle@kylecordes.com>
To: pgsql-performance@postgresql.org
Subject: Re: 8.1 count(*) distinct: IndexScan/SeqScan
Date: Thu, 24 Nov 2005 21:15:44 -0600
Message-ID: <438681E0.6070006@kylecordes.com> (raw)
In-Reply-To: <17380.1132886273@sss.pgh.pa.us>
References: <334D9941-B5B3-4D18-8312-F85D0FB054ED@rilk.com>
	<A6F55E12-4479-49F6-B3EE-8CFCC8541179@rilk.com>
	<17380.1132886273@sss.pgh.pa.us>

Tom Lane wrote:

>What "same result"?  You only ran it up to 2K rows, not 2M.  In any
>case, EXPLAIN without ANALYZE is pretty poor ammunition for complaining
>that the planner made the wrong choice.  I ran the same 
>

Hello, sorry to jump in mid-stream, but this reminded me of something.

I have hit cases where I have a query for which there is a somewhat 
"obvious" (to a human...) query plan that should make it possible to get 
a query answer pretty quickly.  Yet the query "never" finishes (or 
rather, after hours of waiting I finally kill it).  I assume this is 
because of a sub-optimal query plan.  But, it appears that an EXPLAIN 
ANALYZE runs the actual query, so it takes as long as the actual query.

In such a case, how can I go about tracking down the issue, up to an 
including a complaint about the query planner?   :-)

(Overall, I'm pretty pleased with the PG query planner; it often gets 
better results than another, popular commercial DBMS we use here.... 
that is just a general impression, not the result of setting up the same 
schema in each for a comparison.)

Kyle Cordes
www.kylecordes.com





view thread (12+ messages)  latest in thread

Message-ID: <438681E0.6070006@kylecordes.com>
Permalink:  ../438681E0.6070006@kylecordes.com/
Also on:    postgresql.org/message-id/438681E0.6070006@kylecordes.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: kyle@kylecordes.com
  Subject: Re: 8.1 count(*) distinct: IndexScan/SeqScan
  In-Reply-To: <438681E0.6070006@kylecordes.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox