Re: Query is fast and function is slow

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query is fast and function is slow
Дата
Msg-id 16166.1165509626@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Query is fast and function is slow  (Richard Ray <rray@mstc.state.ms.us>)
Ответы Re: Query is fast and function is slow  (Richard Ray <rray@mstc.state.ms.us>)
Список pgsql-sql
Richard Ray <rray@mstc.state.ms.us> writes:
> On Thu, 7 Dec 2006, Thomas Pundt wrote:
>> Just a guess: is the column "doc_num" really of type text? Maybe using "text"
>> in the function lets the planner choose a sequential scan?

> Actually "doc_num" is char(9)
> I changed text to char(9) and got same slow results

You need to make the second argument type "name", too, if you have a lot
of users.
        regards, tom lane


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

Предыдущее
От: Thomas Pundt
Дата:
Сообщение: Re: Query is fast and function is slow
Следующее
От: Richard Ray
Дата:
Сообщение: Re: Query is fast and function is slow