X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 45A4553902 for ; Sat, 9 Apr 2005 05:01:16 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 44106-04 for ; Sat, 9 Apr 2005 04:01:06 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 5C29B533B5 for ; Sat, 9 Apr 2005 05:01:05 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j3940uDk019039; Sat, 9 Apr 2005 00:00:56 -0400 (EDT) To: Alvaro Herrera Cc: Josh Berkus , Michael Fuhr , pgsql-performance@postgresql.org Subject: Re: Functionscan estimates In-reply-to: <20050408235731.GA6279@dcc.uchile.cl> 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> Comments: In-reply-to Alvaro Herrera message dated "Fri, 08 Apr 2005 19:57:31 -0400" Date: Sat, 09 Apr 2005 00:00:56 -0400 Message-ID: <19038.1113019256@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/184 X-Sequence-Number: 11581 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 ... regards, tom lane