[postgis-devel] RE: estimated extent
Mark Cave-Ayland
m.cave-ayland at webbased.co.uk
Fri Dec 10 05:20:56 PST 2004
> -----Original Message-----
> From: strk [mailto:strk at keybit.net]
> Sent: 10 December 2004 12:13
> To: Mark Cave-Ayland
> Cc: postgis-devel at postgis.refractions.net
> Subject: estimated extent
>
>
> Hello Mark.
> I've added an 'estimated_extent' function to postgis,
> which retrives the extent of sample data from the
> pg_statistic table. A question for you: how much should the
> sample extent grow to closer match *real* extent from a
> statistical point of view ?
>
> --strk;
Hi strk,
Do you mean should we use some method to account for the estimated
difference between the sample extent and the real extent? I think I would be
inclined to work assuming the sample extent ~= real extent to begin with,
because since we assume there is no data outside the area then we return a
correspondingly smaller estimate, and hence we are more likely to use an
index scan. I'm willing to be proved wrong though, since this is the first
time we have attempted to code a selectivity function for a join and I have
no suitable dataset to test this at the moment.
One more thing: I did some testing earlier in the year and found that the
current SDFACTOR of 2 was cutting out too many good geometries for me - a
figure of around 3.25 seemed to be much better, but I didn't get around to
making the change. This should also have the effect of making the estimated
extent closer to the real extent, so you might like to make this change at
the same time during your testing.
Kind regards,
Mark.
------------------------
WebBased Ltd
South West Technology Centre
Tamar Science Park
Plymouth
PL6 8BT
T: +44 (0)1752 791021
F: +44 (0)1752 791023
W: http://www.webbased.co.uk
More information about the postgis-devel
mailing list