[postgis-devel] Re: geometry stats

strk strk at keybit.net
Wed Feb 25 02:20:56 PST 2004


chodgson wrote:
> 
> > 	4) why does the returned estimate change the result of a query ?
> > 	   [ box_contained() bug ? ]
> 
> If the index "contains" function is different than the && operator, (ie. at 
> least one of them is bugged/incorrect) then the results will be different if a 
> sequence scan is used than if an index scan is used... and the results of the 
> estimate affect the decision of whether or not to use the index. There seem to 
> be enough complaints about not getting the correct results that I think one of 
> the box_contain[s|ed] functions must be broken.

Taking a look at the code it seems the the index overlap function
is box_overlap taken from external source, while  sequencial
scan uses geometry_overlap(). It might be better to get the
full control over geometry operations (they might have changed
something inthe box containment funx).

I won't be able to go on with estimation tuning as long as the bug
is there, but my brain is absorbed by the selectivity estimation.
Any help on this ? Mark ?

--strk;



More information about the postgis-devel mailing list