From: Kevin Brown <kevin@sysexperts.com>
To: Pgsql-Performance (E-mail) <pgsql-performance@postgresql.org>
Subject: Re: How to interpret this explain analyse?
Date: Wed, 16 Feb 2005 13:09:28 -0800
Message-ID: <20050216210928.GB31014@filer> (raw)
In-Reply-To: <877jla47he.fsf@stark.xeocode.com>
References: <A3D1526C98B7C1409A687E0943EAC410605F00@obelix.askesis.nl>
<13008.1108150825@sss.pgh.pa.us>
<20050215001011.GA31014@filer>
<877jla47he.fsf@stark.xeocode.com>
Greg Stark wrote:
>
> Kevin Brown <kevin@sysexperts.com> writes:
> > Also, one has to ask what the consequences are of assuming a value too
> > low versus too high. Which ends up being worse?
>
> This is one of the things the planner really cannot know. Ultimately it's the
> kind of thing for which hints really are necessary. Oracle distinguishes
> between the "minimize total time" versus "minimize startup time" with
> /*+ ALL_ROWS */ and /*+ FIRST_ROWS */ hints, for example.
Well, the planner *can* know the actual value to use in this case, or
at least a close approximation, but the system would have to gather
some information about cursors during fetches. At the very least, it
will know how many rows were actually fetched by the cursor in
question, and it will also hopefully know how many rows were returned
by the query being executed. Store the ratio of the two in a list,
then store the list itself into a table (or something) at backend exit
time.
--
Kevin Brown kevin@sysexperts.com
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: kevin@sysexperts.com
Subject: Re: How to interpret this explain analyse?
In-Reply-To: <20050216210928.GB31014@filer>
* 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