Robin Ericsson [EMAIL PROTECTED] writes:
Is there even a way to solve it this way via a procedure?
If you want the range to depend on a procedure parameter then you're
back to square one: the planner has no way to know the values that
parameter will take on, and its default assumption is that
After some discussion on performance list, I guess this is back to a
general question :)
This is very simplified query of my real problem, but it should show the
way of the problems.
CREATE OR REPLACE FUNCTION ago(interval) RETURNS timestamp AS
'SELECT (now() - $1)::timestamp without time zone'
One's marked VOLATILE, the other is marked IMMUTABLE. This affects
whether it's considered a constant, the planner estimates and hence
whether it uses the index.
On Thu, Oct 14, 2004 at 05:30:58PM +0200, Robin Ericsson wrote:
After some discussion on performance list, I guess this is back to a
Martijn van Oosterhout [EMAIL PROTECTED] wrote:
One's marked VOLATILE, the other is marked IMMUTABLE. This affects
whether it's considered a constant, the planner estimates and hence
whether it uses the index.
Is there even a way to solve it this way via a procedure?
I've tried different