| От | Alan Hodgson |
|---|---|
| Тема | Re: efficiency of wildcards at both ends |
| Дата | |
| Msg-id | 2772502.y0rLb9S7jb@skynet.simkin.ca обсуждение |
| Ответ на | efficiency of wildcards at both ends (Sam Z J <sammyjiang721@gmail.com>) |
| Ответы |
Re: efficiency of wildcards at both ends
Re: efficiency of wildcards at both ends |
| Список | pgsql-general |
On Wednesday, June 20, 2012 01:10:03 PM Sam Z J wrote: > Hi all > > I'm curious how is wildcards at both ends implemented, e.g. LIKE '%str%' > How efficient is it if that's the only search criteria against a large > table? how much does indexing the column help and roughly how much more > space is needed for the index? > Indexing helps not at all. If the search string starts with a wildcard you will always get a sequential scan of the whole table. Look at the full text search documentation for a better approach.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера