| От | Bruno Wolff III |
|---|---|
| Тема | Re: Very slow search using basic pattern matching |
| Дата | |
| Msg-id | 20040518161256.GA911@wolff.to обсуждение исходный текст |
| Ответ на | Very slow search using basic pattern matching (Dan Field <dof@llgc.org.uk>) |
| Ответы |
Re: Very slow search using basic pattern matching
|
| Список | pgsql-sql |
On Tue, May 18, 2004 at 16:47:11 +0100, Dan Field <dof@llgc.org.uk> wrote: > FROM > da_records > WHERE > da_records.DESCRIPTION_CY ~* '.*Aberystwyth*.' > OR > da_records.TITLE_CY ~* '.*Aberystwyth*.' > limit 100 > > Is there a better way of matching the string? (Must be case insensitive) This is going to require a sequential scan and if you aren't going to hit 100 entries near the beginning of the table, you will be effectively doing a full scan of the table. You might try looking at the tsearch2 contrib entry (a package for full text searching) as that will likely be able to help you out.
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера