Re: [PERFORM] substring index what is better way to query

2017-06-20 Thread Tom Lane
Tieson Molly writes: > is there a different construct than the Similar To that would work? > I know for certain that the first few characters could be different due to > the nature of geohashes. So I may not be able to optimize the prefix > aspect in some cases. Depending on what patterns you'r

Re: [PERFORM] substring index what is better way to query

2017-06-20 Thread Tieson Molly
Tom, is there a different construct than the Similar To that would work? I know for certain that the first few characters could be different due to the nature of geohashes. So I may not be able to optimize the prefix aspect in some cases. Best regards, Ty On Jun 20, 2017 10:19 AM, "Tom Lane"

Re: [PERFORM] substring index what is better way to query

2017-06-20 Thread Tom Lane
Tieson Molly writes: > 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

[PERFORM] substring index what is better way to query

2017-06-20 Thread Tieson Molly
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 l