[postgis-devel] [PostGIS] #520: No check for different srid on operators when index is used
PostGIS
trac at osgeo.org
Thu May 6 09:29:09 PDT 2010
#520: No check for different srid on operators when index is used
----------------------+-----------------------------------------------------
Reporter: nicklas | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 1.5.2
Component: postgis | Version: 1.5.X
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment (by mcayland):
Right. This is likely because your tables tbl1 and tbl2 have no
overlapping regions. When returning an index scan from an operator,
PostgreSQL simply reads the bounding boxes from the index and returns them
for use within the query - so in other words they don't go through the
main operator function. We don't store the SRID in the bounding box since
it is redundant information, i.e. for most use cases the SRID for a whole
table should be the same and so it ends up just taking space.
IMO having the actual operator functions in lwgeom_gist.c is misleading
because they are not just used from within the index code which is
probably where your confusion comes from.
Originally we had the RECHECK operator which would trap this case, but
since it has been demonstrated to contribute a significant overhead to
several types of query it has now been removed.
HTH,
Mark.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/520#comment:2>
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-devel
mailing list