[postgis-users] strange behaviour in PostGIS strictly below operator?
strk at kbt.io
Fri Aug 11 07:28:02 PDT 2017
On Fri, Aug 11, 2017 at 04:16:44PM +0200, Thijs van den Berg wrote:
> Thanks for helping me understand, very clear.
> That makes me think there is no way around this, considering I want/need to use GIST indices to speedup these type of queries? If I did the following type of query (which *does* give the intended result) then it looks like it’s doing a full table scan instead of using the GIST.
> SELECT ST_X(ST_PointFromText('POINT(2288605254 0)')) < ST_X(ST_PointFromText('POINT(2288605300 0)'));
You can use the << operator on geometry to use the index and the <
operator on X to refine as a filter.
SELECT g << ST_PointFromText('POINT(2288605300 0)')
AND ST_X(g) < 2288605300
More information about the postgis-users