[postgis-tickets] [PostGIS] #2614: Prepared geometry support for ST_DWithin

PostGIS trac at osgeo.org
Mon Jan 20 15:11:38 PST 2014


#2614: Prepared geometry support for ST_DWithin
-------------------------+--------------------------------------------------
 Reporter:  robe         |       Owner:  pramsey      
     Type:  enhancement  |      Status:  new          
 Priority:  medium       |   Milestone:  PostGIS 2.2.0
Component:  postgis      |     Version:  trunk        
 Keywords:               |  
-------------------------+--------------------------------------------------
Description changed by robe:

Old description:

> In some cases, despite what we tell people, doing an
> {{{
> ST_Intersects(geom1, ST_Buffer(geom2,radius))
> }}}
>

> is sometimes faster than ST_DWithin(geom1,geom2)
>
> Granted ST_DWithin is faster.
>
> I'll come up with a small self-standing example to demonstrate the point.
> The one I have currently is kind of hefty.
>
> But basic assumption is if you have a fairly large constant geometry then
> ST_Intersects(ST_Buffer..) often out performs ST_DWithin.  I assume this
> is because ST_Intersects takes advantage of prepared geometries and
> ST_DWithin does not.

New description:

 In some cases, despite what we tell people, doing an
 {{{
 ST_Intersects(geom1, ST_Buffer(geom2,radius))
 }}}


 is sometimes faster than ST_DWithin(geom1,geom2, radius)

 Granted ST_DWithin is more accurate.

 I'll come up with a small self-standing example to demonstrate the point.
 The one I have currently is kind of hefty.

 But basic assumption is if you have a fairly large constant geometry then
 ST_Intersects(ST_Buffer..) often out performs ST_DWithin.  I assume this
 is because ST_Intersects takes advantage of prepared geometries and
 ST_DWithin does not.

--

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2614#comment:1>
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