Timeline for For which operations a PostGIS Geography index is useful?
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 12, 2013 at 15:18 | comment | added | mtn.biker | I see your point now. Thanks for walking me through it. | |
Aug 12, 2013 at 10:12 | comment | added | Ortwin Gentz |
I mentioned my use case of k-nearest neighbors (KNN). This basically involves queries like SELECT * FROM pois, ST_DISTANCE(pois.location, <reference point>) AS Distance ORDER BY Distance DESC LIMIT 10 . It makes a huge difference whether such queries use an index or not.
|
|
Aug 11, 2013 at 3:41 | comment | added | mtn.biker | The reason why I find this question confusing is that there is no reason to use an index - spatial nor otherwise - to solve a math calculation like finding the distance between two places. So it makes sense that ST_Distance doesn't take advantage of a spatial index. I'd expect the other geography functions that 'use' a spatial index are those that select/operate on a table of geometries, like ST_Intersects, ST_Covers. ie; there's probably no benefit to using an index to writing out a geography to text (ST_AsText). | |
Aug 9, 2013 at 21:54 | comment | added | Ortwin Gentz |
I'm aware of the functions for the geography type. My question is which of them actually use the index. ST_DISTANCE apparently doesn't.
|
|
Aug 9, 2013 at 16:38 | history | answered | mtn.biker | CC BY-SA 3.0 |