Search Postgresql Archives

Re: Shall I convert all my stored procedure to use "EXECUTE", to ensure I get index-scan

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

 



On 22/01/2010 10:54 PM, Sam Mason wrote:
On Fri, Jan 22, 2010 at 01:49:50AM -0800, Yan Cheng Cheok wrote:
By refering to
http://archives.postgresql.org/pgsql-general/2010-01/msg00846.php

Does this means, I shall convert *ALL* my stored procedure, which use
function parameter during its SQL query, to use EXECUTE, to ensure I
always get index-scan?

I wouldn't bother, mainly because converting to EXECUTE does *not*
ensure it'll use an index scan.  Just that the stats it's picking up
will be more appropriate to the query in question.

I increasingly wish I had the brain-power to tackle implementing a 'REPLAN' option on PL/PgSQL functions and/or an 'EXECUTE REPLAN' for prepared queries...

--
Craig Ringer

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux