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

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Shall I convert all my stored procedure to use "EXECUTE", to ensure I get index-scan
Дата
Msg-id 4B5A61C7.4060504@postnewspapers.com.au
обсуждение исходный текст
Ответ на Re: Shall I convert all my stored procedure to use "EXECUTE", to ensure I get index-scan  (Sam Mason <sam@samason.me.uk>)
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Slow Query / Check Point Segments
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: When is the release date for Postgres 8.5?