pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim C. Nasby <decibel@decibel.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@dcc.uchile.cl>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: Michael Fuhr <mike@fuhr.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: Functionscan estimates
Date: Sat, 9 Apr 2005 10:22:57 -0500
Message-ID: <20050409152257.GG93835@decibel.org> (raw)
In-Reply-To: <19038.1113019256@sss.pgh.pa.us>
References: <200504081515.50340.josh@agliodbs.com>
	<20050408223820.GA17450@winnie.fuhr.org>
	<20050408224556.GC19458@dcc.uchile.cl>
	<200504081604.27845.josh@agliodbs.com>
	<20050408235731.GA6279@dcc.uchile.cl>
	<19038.1113019256@sss.pgh.pa.us>

On Sat, Apr 09, 2005 at 12:00:56AM -0400, Tom Lane wrote:
> Not too many releases ago, there were several columns in pg_proc that
> were intended to support estimation of the runtime cost and number of
> result rows of set-returning functions.  I believe in fact that these
> were the remains of Joe Hellerstein's thesis on expensive-function
> evaluation, and are exactly what he was talking about here:
> http://archives.postgresql.org/pgsql-hackers/2002-06/msg00085.php
> 
> But with all due respect to Joe, I think the reason that stuff got
> trimmed is that it didn't work very well.  In most cases it's
> *hard* to write an estimator for a SRF.  Let's see you produce
> one for dblink() for instance ...

Actually, if the remote database supported a way to get a rows estimate
from the query passed to db_link, it would be trivial, since you'd just
pass that back.

In fact, having such a function (estimate_rows_for_sql(text)) would
probably be very useful to functions that wanted to support returning a
rows estimate.
-- 
Jim C. Nasby, Database Consultant               decibel@decibel.org 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"



view thread (13+ messages)  latest in thread

Message-ID: <20050409152257.GG93835@decibel.org>
Permalink:  ../20050409152257.GG93835@decibel.org/
Also on:    postgresql.org/message-id/20050409152257.GG93835@decibel.org

 · 

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: decibel@decibel.org, tgl@sss.pgh.pa.us, alvherre@dcc.uchile.cl, josh@agliodbs.com, mike@fuhr.org
  Subject: Re: Functionscan estimates
  In-Reply-To: <20050409152257.GG93835@decibel.org>

* 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