Re: Best way to use indexes for partial match at beginning
В списке pgsql-general по дате отправления:
| От | Andrus |
|---|---|
| Тема | Re: Best way to use indexes for partial match at beginning |
| Дата | |
| Msg-id | dktnpn$2jrl$2@news.hub.org обсуждение |
| Ответ на | Best way to use indexes for partial match at beginning ("Andrus Moor" <eetasoft@online.ee>) |
| Ответы |
Re: Best way to use indexes for partial match at
Re: Best way to use indexes for partial match at beginning |
| Список | pgsql-general |
> you can create two indexes: > > CREATE INDEX myindex_lc on mytable(col1 text_pattern_ops); > and > CREATE INDEX myindex_normal ON foo(col1); > > the first one will be used when using LIKE and the other for normal > comparisons . Jaime, CREATE INDEX myindex_normal ON foo(col1); Creates btree structure. In other dbm system btree structure can be used for searches where only some first characters in index key are known. So I see no reason to create second index using text_pattern_ops for this purpose. I'm searching a way to use Postgres regular index for this. Andrus.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера