Re: [HACKERS] Custom geometry, why slow?

2009-08-14 Thread Tom Lane
Paul Matthews writes: > The problem is, according to EXPLAIN, it still wants to do a sequential > scan and not use the index. Any pointers as to why? Can you force it with enable_seqscan = off? If so, then positionsel isn't estimating a small enough number of matches to make an indexscan look us

[HACKERS] Custom geometry, why slow?

2009-08-13 Thread Paul Matthews
The story so far ... The provide polygon@>point routine does not work correctly when the points are close to the boundary. So we implemented a custom contains(poly,point) function. In order to stop all points being checked against all polygons, a separate bounding box is maintained. So the query ha