Re: explain -> how to optimize? - Mailing list pgsql-general

From will trillich
Subject Re: explain -> how to optimize?
Date
Msg-id 20010309011839.C17114@mail.serensoft.com
Whole thread Raw
In response to Re: explain -> how to optimize?  (Neil Conway <nconway@klamath.dyndns.org>)
List pgsql-general
On Wed, Mar 07, 2001 at 06:39:30PM -0500, Neil Conway wrote:
> On Wed, Mar 07, 2001 at 11:24:34AM -0600, will trillich wrote:
> > here's an EXPLAIN on a VIEW which links a few tables:
>
> Can you give us the definition of the VIEW?
>
> Also, what kinds of data are you dealing with? Stuff like the
> # of rows. Are the planner estimate's below reasonable?

very tiny numbers to start with. no live data yet, only tinkering
with examples.

> [...]
> > okay, there's a ton of sorts and so forth in there that don't
> > seem to be needed; plus i'm sure i've got indexes on the
> > linked-to tables, so why the SEQ scans, i dunno.
>
> It's using SEQ scans because it thinks they're faster than index scans --
> in this case, is the planner incorrect?

the definition of the views and tables are rather involved,
so maybe i ought not post publicly and flood the list with
poorly-crafted flotsam...? does the planner change its tune for
larger tables?

--
It is always hazardous to ask "Why?" in science, but it is often
interesting to do so just the same.
        -- Isaac Asimov, 'The Genetic Code'

will@serensoft.com
http://newbieDoc.sourceforge.net/ -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

pgsql-general by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: How to read/write multibyte to database
Next
From: Einar Karttunen
Date:
Subject: Re: inheritance and primary/foreign keys