[postgis-tickets] [PostGIS] #3739: ST_Within Not using index
PostGIS
trac at osgeo.org
Mon Apr 17 04:46:30 PDT 2017
#3739: ST_Within Not using index
--------------------------+---------------------------
Reporter: postgispaul | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.3.3
Component: postgis | Version: 2.3.x
Resolution: | Keywords:
--------------------------+---------------------------
Comment (by postgispaul):
Thanks for your reformatting and fast answer!
St_intersects does not have that issue. It's correctly using the index on
ap.way && s.way without explicitly adding that condition.
I also did create a new
{{{
CREATE OR REPLACE FUNCTION public.st_withintest(
geom1 geometry,
geom2 geometry)
RETURNS boolean AS
'SELECT $2 OPERATOR(public.~) $1 AND public._ST_Contains($2,$1)'
LANGUAGE sql IMMUTABLE
COST 100;
}}}
function to rule out messed up function definitions, but that didn't help
either.
Could that corrupt index be caused by postgres 9.6.1? I did see some
related bugs fixed in 9.6.3
Anyway, reindex is running
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3739#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list