Re: Cursor fetch performance issue

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cursor fetch performance issue
Дата
Msg-id 7727.1327440497@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Cursor fetch performance issue  (Tony Capobianco <tcapobianco@prospectiv.com>)
Список pgsql-performance
Tony Capobianco <tcapobianco@prospectiv.com> writes:
> Running just the sql of the function returns only 10 rows:
> pg=# SELECT m.memberid, m.websiteid, m.emailaddress,
> pg-#                m.firstname, m.lastname, m.regcomplete, m.emailok
> pg-#         FROM   members m
> pg-#         WHERE  m.emailaddress LIKE 'test.email@hotmail.com'
> pg-#         AND    m.changedate_id < 5868 ORDER BY m.emailaddress, m.websiteid;

Based on that, I'd bet your problem is that the function is executing
    WHERE  m.emailaddress LIKE $1
(for some spelling of $1) and you are therefore not getting the benefit
of the index optimizations that can happen when LIKE's pattern is
constant.  Do you actually need LIKE rather than just "=" here?

            regards, tom lane

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Cursor fetch performance issue
Следующее
От: Tony Capobianco
Дата:
Сообщение: Re: Cursor fetch performance issue