[postgis-devel] 3D spatial index is not working

Jose Carlos Martinez Llario jomarlla at cgf.upv.es
Thu Dec 29 13:22:27 PST 2011


Thanks Paul, its working now with gist_geometry_ops_nd,
sorry about that.
Best,

On 29/12/2011 21:54, Jose Carlos Martinez Llario wrote:
> Dear PostGIS team,
>
> p3d is a table with points in 3d and an spatial index on geom.
> Explain analyze shows 3d spatial index is not working.  I forced 
> PostgreSQL to use index with SET enable_seqscan = false just in case.
>
> r8612-1=# explain analyze select count(*) from p3d where geom &&& 
> 'LINESTRING (690388.797 4369343.266 600,690906.097 4369841.766 
> 600.5)'::geometry;
> QUERY PLAN
> Aggregate  (cost=10000002117.72..10000002117.73 rows=1 width=0) 
> (actual time=54.430..54.431 rows=1 loops=1)
>   ->  Seq Scan on p3d  (cost=10000000000.00..10000002117.50 rows=87 
> width=0) (actual time=0.041..53.394 rows=2148 loops=1)
>         Filter: (geom &&& 
> '0102000080020000004E621098A9112541DD2406D1EFAA50410000000000C08240E7FBA931B4152541DD2406716CAB50410000000000C48240'::geometry)
>
> Has PostGIS 2.0 already implemented 3d spatial index right?
> What Im doing wrong then?
>
> Im using trunk r8612.
>
> Thanks in advance,
> Best,
> Jose
>




More information about the postgis-devel mailing list