pg.ddx.io pgsql-performance@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@dcc.uchile.cl>
To: Michael Fuhr <mike@fuhr.org>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Functionscan estimates
Date: Fri, 8 Apr 2005 18:45:56 -0400
Message-ID: <20050408224556.GC19458@dcc.uchile.cl> (raw)
In-Reply-To: <20050408223820.GA17450@winnie.fuhr.org>
References: <200504081515.50340.josh@agliodbs.com>
<20050408223820.GA17450@winnie.fuhr.org>
On Fri, Apr 08, 2005 at 04:38:20PM -0600, Michael Fuhr wrote:
> On Fri, Apr 08, 2005 at 03:15:50PM -0700, Josh Berkus wrote:
> >
> > I'm wondering if it might be useful to be able to add estimated selectivity to
> > a function definition for purposes of query estimation. Currently function
> > scans automatically return a flat default 1000 estimated rows. It seems
> > like the DBA ought to be able to ALTER FUNCTION and give it a row estimate
> > for planning purposes.
>
> About a month ago I mentioned that I'd find that useful. In a
> followup, Christopher Kings-Lynne brought up the idea of a GUC
> variable that could give hints about the expected row count.
That seems pretty limited ... what happens if the query contains more
that one SRF?
Maybe issuing some sort of special call to the function (say, with
some boolean in the call info struct) on which it returns planning data;
thus the planner can call the function itself. The hard part would be
figuring out how to do it without breaking backwards compatibility with
functions that don't know how to handle that. (And how to do it in
plpgsql).
--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"La principal caracterÃstica humana es la tonterÃa"
(Augusto Monterroso)
view thread (13+ messages) latest in thread
Message-ID: <20050408224556.GC19458@dcc.uchile.cl> Permalink: ../20050408224556.GC19458@dcc.uchile.cl/ Also on: postgresql.org/message-id/20050408224556.GC19458@dcc.uchile.cl ·
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: alvherre@dcc.uchile.cl, mike@fuhr.org, josh@agliodbs.com Subject: Re: Functionscan estimates In-Reply-To: <20050408224556.GC19458@dcc.uchile.cl> * 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