[postgis-devel] ST_DistanceCached(geog, geog), ST_DWithinCached(geog, geog)

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Tue Jun 19 15:06:32 PDT 2012


On 19/06/12 04:46, Paul Ramsey wrote:

> I've temporarily committed two functions to Geography support in trunk,
>
> ST_DistanceCached(geog, geog)
> ST_DWithinCached(geog, geog, double)
>
> These would take over from ST_Distance(geog, geog) and
> ST_DWithin(geog, geog, double) when good behavior, performance are
> confirmed. The only difference between them and their antecedants is
> that they try and cache an internal geography tree. This seems to make
> a massive, monster difference for distance calculations. Oddly, I
> haven't been able to demonstrate a speed difference in DWithin yet, at
> least not with fairly small tolerance values.
>
> Please feel free to test and let me know how things go.

Oh interesting. Do you have any easy-to-demonstrate test cases to run in 
an .sql file so we can get a feel for the speedup?


ATB,

Mark.



More information about the postgis-devel mailing list