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: | 28140.1138992877@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-02-03 18:58:30 | Re: Passing arguments to views |
Previous Message | Mark Dilger | 2006-02-03 18:46:07 | Re: Passing arguments to views |