Dear Regina, You are still my personal PostGIS heroine! :) That *surely* helped! The revised query ran @~75ms against the former which ran @~200ms !
About the b_box field... you're right... it's a stupid field name for
the *complex* geometries it contains (like mpolys for Portugal, Spain,
etc..) (blush)
Now that PreparedGeometry seems very promising... :P
Again I'm in your debt. Many, many thanks!
All the best,
Pedro.
On Tue, 2008-09-02 at 08:51 -0400, Obe, Regina wrote:
> Dear Regina,
>
> > Thanks for your suggestion :)
> > The thing is that using st_intersects doesn't help. :-(
> > The performance is exactly the same which actually puzzles me for
> > functions (namely ST_Within) that should return almost instantly ...
> > Problem being that as far as I can see there's no other function that
> > replaces these for the same effect...
>
> Pedro,
> You could try ST_DWithin. It could be that since your geometries are so
> big and possibly complex - the penalty of crossing the Geos barrier is
> very high.
>
> ST_DWithin as I recall doesn't use Geos so may just perform better in
> this case.
>
> Try
>
> SELECT road_network, toponymy FROM maps AS m WHERE
> st_dwithin(ST_geomfromtext('POINT($lon $lat)',4326), m.b_box, 0.001)
>
> Note - I had to do a 0.001 proximity since ST_Dwithin does an internal
> distance < whatever you put in. You can make this even smaller.
> Why is it called b_box (is it really a bbox or a complex geometry? If it
> is a bbox not sure the point of not just doing a &&)
>
>
> >(Call to developers)
> >This leads me to asking: isn't there room for improvement in these
> >functions?
>
> Yap room for lots of improvement in GEOS and don't worry we are working
> on it.
> As Paul Ramsey mentioned there is the PreparedGeometry which is in the
> works which should help large geometries. There is also cleanup going
> on with other inefficiencies.
>
> Thanks,
> Regina
>
> -----------------------------------------
> The substance of this message, including any attachments, may be
> confidential, legally privileged and/or exempt from disclosure
> pursuant to Massachusetts law. It is intended
> solely for the addressee. If you received this in error, please
> contact the sender and delete the material from any computer.
>
> _______________________________________________
> postgis-users mailing list
> [email protected]
> http://postgis.refractions.net/mailman/listinfo/postgis-users
signature.asc
Description: This is a digitally signed message part
_______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
