[postgis-users] Re: [postgis-devel] Several R-Trees

Martin Davis mbdavis at refractions.net
Thu Mar 29 10:05:16 PDT 2007


Thanks for the excellent in-depth info, Mark.

Mark Cave-Ayland wrote:
> On Thu, 2007-03-29 at 09:06 -0700, Martin Davis wrote:
>   
>> Isn't it the case that given a two-table join, the query engine will 
>> always do a sequential scan of one table and look up values using the 
>> index of the other table (assuming the optimizer decides to use the 
>> index in the first place, of course) ? 
>>     
>
> Not necessarily as it depends on the data types; there are a number of
> ways of performing a join across two tables, such as Merge Join and Hash
> Join (as well as Nested Loop). In fact, you can use int columns and a
> subselect to help bring one side of an (expensive) spatial join outside
> of a Nested Loop and into a Merge Join if you know what you are doing.
>
> Note that the geometry overlap operator is not hashable/sortable since
> it doesn't represent an equality: see
> http://www.postgresql.org/docs/7/static/xoper.htm for more information.
>
>
> Kind regards,
>
> Mark.
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>   

-- 
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022




More information about the postgis-users mailing list