[postgis-devel] Re: geometry stats
strk
strk at keybit.net
Tue Feb 24 12:16:29 PST 2004
m.cave-ayland wrote:
> Hi strk,
>
> Yup that sounds good. As you've probably realised, the only thing that
> can't be configured in the estimator is the number of boxes per side :)
Actually I've tought we could set it instead...
The geometry_analyze could set it based on geometry type
or some other euristhic, and pass it to the compute_geometry_stat
via stats->extra_data. But I'd discuss this when we have something
working.
> > Then the estimator will need a change too... but I'd like to
> > discuss this later.
>
> Was there anything in particular you had in mind? The only case I can
> think of is that since we are working on a sample then we may have to
> calculate the value for some extents that lie outside the bounds of our
> histogram. However since the data is randomly sampled from the whole
> table then we can be fairly sure that this number will need to be a
> small fraction of the number of rows in the table - but we'll probably
> have to determine the best value by trial and error.
I'm more concerned about knowing the actual extent of the whole dataset,
so to be able to return 0.0 for constants just outside of it...
anyway a quick curve from the borders to infinitely far could do the
right thing.
What I'm stuck now is writing the estimator. I've seen a lot of
static funx in selfuncs.c, and I don't know wheter to copy them
or just parse the args List myself (I'm not confident with
pg data structure - could you help out ?)
> Keep up the good work!
Thanks, I need this :)
--strk;
More information about the postgis-devel
mailing list