Re: [GENERAL] Large data and slow queries
| От | John R Pierce |
|---|---|
| Тема | Re: [GENERAL] Large data and slow queries |
| Дата | |
| Msg-id | dd56dc4e-04e2-1d75-e142-10ed8510377d@hogranch.com обсуждение исходный текст |
| Ответ на | [GENERAL] Large data and slow queries (Samuel Williams <space.ship.traveller@gmail.com>) |
| Ответы |
Re: [GENERAL] Large data and slow queries
|
| Список | pgsql-general |
On 4/18/2017 9:01 PM, Samuel Williams wrote: > We want the following kinds of query to be fast: > > SELECT ... AND (latitude > -37.03079375089291 AND latitude < > -36.67086424910709 AND longitude > 174.6307139779924 AND longitude < > 175.0805140220076); I wonder if GIST would work better if you use the native POINT type, and compared it like mypoint <@ BOX '((174.6307139779924,-37.03079375089291),(175.0805140220076,-36.67086424910709 ))' with a gist index on mypoint... but, it all hinges on which clauses in your query are most selective, thats where you want an index. -- john r pierce, recycling bits in santa cruz
В списке pgsql-general по дате отправления: