Robert Haas wrote:
2010/11/25 pasman pasma?ski pasma...@gmail.com:
I've seen this as well be a performance issue, in particular with
partitioned tables.
Out of habit I now write functions that always cache the value of the
function in
a variable and use the variable in the actual query to
On Thu, Mar 10, 2011 at 7:32 PM, Bruce Momjian br...@momjian.us wrote:
Robert Haas wrote:
2010/11/25 pasman pasma?ski pasma...@gmail.com:
I've seen this as well be a performance issue, in particular with
partitioned tables.
Out of habit I now write functions that always cache the value of
2010/11/25 pasman pasmański pasma...@gmail.com:
I've seen this as well be a performance issue, in particular with partitioned
tables.
Out of habit I now write functions that always cache the value of the
function in
a variable and use the variable in the actual query to avoid this particular
I've seen this as well be a performance issue, in particular with partitioned
tables.
Out of habit I now write functions that always cache the value of the function
in
a variable and use the variable in the actual query to avoid this particular
gotcha.
subquery may be used to cache constants:
Someone offlist reported query slowness because we don't convert
function calls with all-constant parameters to be a constants before we
start a sequential scan:
EXPLAIN SELECT * FROM test WHERE
x = to_date('2001-01-01', '-MM-DD') AND
x =
Bruce Momjian br...@momjian.us writes:
Notice the to_date()'s were not converted to constants in EXPLAIN so
they are evaluated for every row. to_date() is marked STABLE.
Is this something we should improve?
No. This is per expectation. Only IMMUTABLE functions can be folded to
constants in
Tom Lane wrote:
Bruce Momjian br...@momjian.us writes:
Notice the to_date()'s were not converted to constants in EXPLAIN so
they are evaluated for every row. to_date() is marked STABLE.
Is this something we should improve?
No. This is per expectation. Only IMMUTABLE functions can be
Bruce Momjian br...@momjian.us writes:
I realize they can't be converted to constants before the query starts
but is there a reason we can't convert those functions to constants in
the executor before a table scan?
Other than the significant number of cycles that would be wasted (in
most
On Wed, Nov 24, 2010 at 21:52, Tom Lane t...@sss.pgh.pa.us wrote:
Bruce Momjian br...@momjian.us writes:
Notice the to_date()'s were not converted to constants in EXPLAIN so
they are evaluated for every row. to_date() is marked STABLE.
No. This is per expectation. Only IMMUTABLE functions
On Nov 24, 2010, at 15:28 , Marti Raudsepp wrote:
On Wed, Nov 24, 2010 at 21:52, Tom Lane t...@sss.pgh.pa.us wrote:
Bruce Momjian br...@momjian.us writes:
Notice the to_date()'s were not converted to constants in EXPLAIN so
they are evaluated for every row. to_date() is marked STABLE.
10 matches
Mail list logo