Skip site navigation (1) Skip section navigation (2)

Re: Passing arguments to views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: josh(at)agliodbs(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org, Chris Campbell <chris(at)bignerdranch(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, Tino Wildenhain <tino(at)wildenhain(dot)de>, Greg Stark <gsstark(at)mit(dot)edu>
Subject: Re: Passing arguments to views
Date: 2006-02-03 18:54:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Josh Berkus <josh(at)agliodbs(dot)com> writes:
> BTW, the other thing that we're still TODOing on SRFs (as far as I know) is 
> finding ways to change the row estimate for an SRF.  It's still a flat 
> 1000 in the code, which can cause a lot of bad query plans.  I proposed a 
> year ago that, as a first step, we allow the function owner to assign a 
> static estimate variable to the function (i.e. "average rows returned = 
> 5').  This doesn't solve the whole problem of SRF estimates but it would 
> be a significant step forwards in being able to use them in queries.

The inlining thing would solve that much better, at least for the cases
where the function can be inlined.  I'm not sure how we can improve the
situation for things like looping plpgsql functions --- the function
owner probably can't write down a hard estimate for those either, in
most cases.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2006-02-03 18:58:30
Subject: Re: Passing arguments to views
Previous:From: Mark DilgerDate: 2006-02-03 18:46:07
Subject: Re: Passing arguments to views

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group