Re: [HACKERS] Re: [GENERAL] indexed regex select optimisation missing?
От | Charles Tassell |
---|---|
Тема | Re: [HACKERS] Re: [GENERAL] indexed regex select optimisation missing? |
Дата | |
Msg-id | 4.2.0.58.19991106170952.00a6c7b0@mailer.isn.net обсуждение исходный текст |
Ответ на | Re: [HACKERS] Re: [GENERAL] indexed regex select optimisation missing? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
more] indexed regex select optimisations?
|
Список | pgsql-general |
I don't know much about the backend stuff, but wouldn't it reduce the amount of records you go through to do a search for FO. and then do a another check on each returned record to check that the last character matches? More checks, but fewer total records. Anyway, just a thought. At 12:46 PM 11/5/99, Tom Lane wrote: >[snip] > > Basically, given that we know the LIKE or regex >pattern can only match values beginning with FOO, we want to generate >string comparisons that select out the range of values that begin with >FOO (or, at worst, a slightly larger range). In USASCII locale it's not >hard: you can do > field >= 'FOO' AND field < 'FOP' >but it's not immediately obvious how to make this idea work reliably >in the presence of odd collation orders or multibyte characters... > >BTW: the \377 hack is actually wrong for USASCII too, since it'll >exclude a data value like 'FOO\377x' which should be included. > > regards, tom lane > >************
В списке pgsql-general по дате отправления: