Re: forced sequential scan when condition has current_user

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: forced sequential scan when condition has current_user
Дата
Msg-id 28309.1262668555@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: forced sequential scan when condition has current_user  (Craig Ringer <craig@postnewspapers.com.au>)
Список pgsql-performance
Craig Ringer <craig@postnewspapers.com.au> writes:
> Erik Jones wrote:
>> current_user() is a stable function and the manual is explicit that the result of stable function can be used in an
indexscan: 

> Yes ... but the planner doesn't know the value current_user will return,

I think it's got nothing to do with that and everything to do with the
fact that he's comparing to a varchar rather than text column ...

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_connect takes 3.0 seconds
Следующее
От: Brad Nicholson
Дата:
Сообщение: Re: DB is slow until DB is reloaded