Re: Query slow as Function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 02/18/2012 11:37 AM, Tom Lane wrote:
Andreas Kretschmer<akretschmer@xxxxxxxxxxxxx>  writes:
You can check the plan with the auto_explain - Extension, and you can
force the planner to create a plan based on the actual input-value by
using dynamic SQL (EXECUTE 'your query string' inside the function)
Steve *is* using EXECUTE, so that doesn't seem to be the answer.  I'm
wondering about datatype mismatches myself --- the function form is
forcing the parameter to be char(9), which is not a constraint imposed
in the written-out query.  There are lots of other possibilities
though.  It would be hard to say much without a self-contained example
to try.

			

He's using EXECUTE ... USING. Does that plan with the used parameter?

cheers

andrew

--
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux