From: | "Jim C(dot) Nasby" <decibel(at)decibel(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Josh Berkus <josh(at)agliodbs(dot)com>, Michael Fuhr <mike(at)fuhr(dot)org>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Functionscan estimates |
Date: | 2005-04-09 15:22:57 |
Message-ID: | 20050409152257.GG93835@decibel.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-performance |
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(at)decibel(dot)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?"
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-04-09 15:45:23 | Re: Functionscan estimates |
Previous Message | John DeSoi | 2005-04-09 14:03:35 | table and column information from cursor? |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-04-09 15:45:23 | Re: Functionscan estimates |
Previous Message | Jim C. Nasby | 2005-04-09 15:17:21 | Re: Any way to speed this up? |