Re: Using POSIX Regular Expressions on xml type fields gives inconsistent results

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Using POSIX Regular Expressions on xml type fields gives inconsistent results
Дата
Msg-id 27093.1356285306@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Using POSIX Regular Expressions on xml type fields gives inconsistent results  ("David Johnston" <polobo@yahoo.com>)
Список pgsql-general
"David Johnston" <polobo@yahoo.com> writes:
>> while it might work to reverse the order in a regex, I have experienced
>> severe slowdown when the pattern comes from table data

> If it is indeed related to the custom reverse query the fact that you are
> going through an SQL wrapper to access a c-level function is inevitably
> going to degrade performance.

I believe that in most situations of interest, the SQL wrapper would get
"inlined" and thus create no significant per-row penalty.  It's possible
this isn't happening in some specific case, but as you say we'd need to
see a concrete example to know one way or the other.

Another point that comes to mind is that "pattern comes from table data"
probably means "query uses a whole lot of different patterns over its
lifetime".  Each different pattern is going to require regex
compilation, which is not a particularly cheap operation.

            regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Insert Assertion Failed in strcoll_l.c:112
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: downgrading a database