Re: Fast statement but slow function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fast statement but slow function
Дата
Msg-id 3297.1020876799@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Fast statement but slow function  (Thomas Beutin <tyrone@laokoon.IN-Berlin.DE>)
Список pgsql-general
Thomas Beutin <tyrone@laokoon.IN-Berlin.DE> writes:
> Is this a bug in my function or in my mind or in postgres?
> Are functions using indexes?

The planning context is different because the planner cannot see a
specific constant in the WHERE clause, only a parameter placeholder.
This might affect the choice of plan --- but without knowing what
indexes you have and what choices are being made, it's hard to say
much.

One question worth asking is whether you've declared the type of
the parameter to agree with the type of the column it's being
compared to.

            regards, tom lane

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

Предыдущее
От: Randall Perry
Дата:
Сообщение: Re: Can this be done in one query?
Следующее
От: Chris Gamache
Дата:
Сообщение: timestamp in 7.1 vs 7.2