Re: BUG #11671: UNACCENT call with constant arg evaluated for each row - Mailing list pgsql-bugs

From David G Johnston
Subject Re: BUG #11671: UNACCENT call with constant arg evaluated for each row
Date
Msg-id 1413356244696-5823070.post@n5.nabble.com
Whole thread Raw
In response to Re: BUG #11671: UNACCENT call with constant arg evaluated for each row  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom Lane-2 wrote
> t.chaumeny@

>  writes:
>> Since UNACCENT function
>
> [...] than naive SQL [...]

Was that intentional... ;)

Given the planner knows its safe, and has to do a sequential scan and so
evaluate the expression many times, the question becomes why then doesn't it
choose that which is, in reality, the faster plan?

Reading 9.3@35.6
http://www.postgresql.org/docs/9.3/static/xfunc-volatility.html

I take it had the plan used an index instead of a sequential scan the
optimization would have occurred...

David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/BUG-11671-UNACCENT-call-with-constant-arg-evaluated-for-each-row-tp5823010p5823070.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done
Next
From: Michael Paquier
Date:
Subject: Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done