Re: BUG #11671: UNACCENT call with constant arg evaluated for each row

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #11671: UNACCENT call with constant arg evaluated for each row
Date: 2014-10-15 06:57:24
Message-ID: 1413356244696-5823070.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)3(at)35(dot)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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2014-10-15 08:31:54 Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done
Previous Message Andres Freund 2014-10-15 06:18:15 Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done