pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bricklen Anderson <BAnderson@PresiNET.com>
To: Greg Stark <gsstark@mit.edu>
Cc: Pgsql-Performance (E-mail) <pgsql-performance@postgresql.org>
Subject: Re: How to interpret this explain analyse?
Date: Tue, 15 Feb 2005 07:11:57 -0800
Message-ID: <4212113D.40808@PresiNET.com> (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:
> 
> 
>>Ouch.  Is this really a reasonable assumption?  I figured the primary
>>use of a cursor was to fetch small amounts of data at a time from a
>>large table, so 10% seems extremely high as an average fetch size.  Or
>>is the optimization based on the number of rows that will be fetched
>>by the cursor during the cursor's lifetime (as opposed to in a single
>>fetch)?
>>
>>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.
> 
> I would also find it reasonable to have hints to specify a selectivity for
> expressions the optimizer has no hope of possibly being able to estimate.
> Things like "WHERE myfunction(col1,col2,?) /*+ 10% */"
> 
> 
Not to mention that hints would be helpful if you want to specify a particular index for a specific 
query (case in point, testing plans and response of various indices without having to drop and 
create other ones). This is a bit of functionality that I'd like to see.



view thread (10+ messages)  latest in thread

Message-ID: <4212113D.40808@PresiNET.com>
Permalink:  ../4212113D.40808@PresiNET.com/
Also on:    postgresql.org/message-id/4212113D.40808@PresiNET.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: BAnderson@PresiNET.com, gsstark@mit.edu
  Subject: Re: How to interpret this explain analyse?
  In-Reply-To: <4212113D.40808@PresiNET.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