Re: Query timing increased from 3s to 55s when used as a function instead of select

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Query timing increased from 3s to 55s when used as a function instead of select
Дата
Msg-id AANLkTingJVG2Kn6g2YDjOu7O_2Upmg9VXCh-WthwLej8@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Query timing increased from 3s to 55s when used as a function instead of select  (Tyler Hildebrandt <tyler@campbell-lange.net>)
Ответы Re: Query timing increased from 3s to 55s when used as a function instead of select
Список pgsql-performance
On Tue, May 25, 2010 at 9:41 AM, Tyler Hildebrandt
<tyler@campbell-lange.net> wrote:
>> I think, your problem is here:
>>
>> SELECT INTO current_user * FROM
>> fn_medirota_validate_rota_master(in_currentuser);
>>
>>
>> The planner has no knowledge about how many rows this functions returns
>> if he don't know the actual parameter. Because of this, this query
>> enforce a seq-scan. Try to rewrite that to something like:
>>
>> execute 'select * from fn_medirota_validate_rota_master(' ||
>> in_currentuser' || ')' into current_user
>>
>
> Thanks for your response.  This doesn't seem to solve our issue, unfortunately.
>
> As a side to that, we have the fn_medirota_validate_rota_master calls in a
> large amount of our other functions that are running very well.

any chance of seeing the function source?

merlin

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

Предыдущее
От: Joshua Tolley
Дата:
Сообщение: Re: tunning pgsql 7.3.7 over RHEL 4.0 32 x86 (2.6.9-5ELsmp)
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Query timing increased from 3s to 55s when used as a function instead of select