Re: Query slow as Function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query slow as Function
Дата
Msg-id 27854.1329583042@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Query slow as Function  (Andreas Kretschmer <akretschmer@spamfence.net>)
Ответы Re: Query slow as Function  (Andrew Dunstan <andrew@dunslane.net>)
Re: Query slow as Function  (Steve Horn <steve@stevehorn.cc>)
Re: Query slow as Function  (Andreas Kretschmer <akretschmer@spamfence.net>)
Список pgsql-performance
Andreas Kretschmer <akretschmer@spamfence.net> 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.

            regards, tom lane

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

Предыдущее
От: Andreas Kretschmer
Дата:
Сообщение: Re: Query slow as Function
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Query slow as Function