| От | Arguile |
|---|---|
| Тема | Re: full text index |
| Дата | |
| Msg-id | LLENKEMIODLDJNHBEFBOIEGHECAA.arguile@lucentstudios.com обсуждение |
| Ответ на | full text index (Ulrich Wisser <liste@publisher.de>) |
| Список | pgsql-general |
> SELECT kw,hits from keywords where kw like'%xyz%'; Using regular expressions in this case is much faster than LIKE, see http://www.postgresql.org/idocs/index.php?functions-matching.html > What is the most efficient way to do it? The table > will have around 3 to 4 million rows. So a full > table scan is out of question. I need the answer in > around one second. (It's a web application) This will still need to do that, if they're keywords you should be doing an exact match on them, else don't maintain an index that won't be used. You may be interested in full text searching which can be found in /contrib/fulltextindex (IIRC) or http://openfts.sourceforge.net .
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера