Re: Speeding up LIKE with placeholders?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Speeding up LIKE with placeholders?
Дата
Msg-id 2939.1094851162@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Speeding up LIKE with placeholders?  (Dan Sugalski <dan@sidhe.org>)
Ответы Re: Speeding up LIKE with placeholders?  (Dan Sugalski <dan@sidhe.org>)
Список pgsql-general
Dan Sugalski <dan@sidhe.org> writes:
> I'd figure, though, that since the parameters are being passed
> into PQexecParams basically to get them out of band so I don't have
> to deal with escaping, quoting, and suchlike things, that the
> optimizer would look at things *after* the substitution was done.

You'd figure wrong :-(.  The present mechanism for the LIKE-to-index
optimization requires the LIKE pattern to be a pure, unadulterated constant.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: SMgrRelation hashtable corrupted
Следующее
От: Dan Sugalski
Дата:
Сообщение: Re: Speeding up LIKE with placeholders?