[PERFORM] substring index what is better way to query

Поиск
Список
Период
Сортировка
От Tieson Molly
Тема [PERFORM] substring index what is better way to query
Дата
Msg-id CADPSLQaAGZ6jxDhqmv2k5YcLiLXPSfdEU7c9wBEAQT40YAsH2w@mail.gmail.com
обсуждение исходный текст
Ответы Re: [PERFORM] substring index what is better way to query  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Good morning,

I have an index I created on the prefix of a column:

create index location_geo_idx ON locations( substring(geohash, 0, 5));

I currently use a similar to query, but I wanted to know if there is a faster way to query multiple value using this index than this?

select l.geohash from locations l where l.geohash similar to '(dr7g|dr7e)%';

My goal is to utilize 9 values each time for the geohash adjacent squares.

Best regards,

Ty

В списке pgsql-performance по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: [PERFORM] Using array instead of sub table (storage and speed)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PERFORM] substring index what is better way to query