> Date: Thu, 04 Aug 2005 11:12:58 -0400
> From: Tom Lane <[EMAIL PROTECTED]>
> To: Matteo Beccati <[EMAIL PROTECTED]>
> Cc: pgsql-hackers@postgresql.org
> Subject: Re: Enhanced containment selectivity function 
> Message-ID: <[EMAIL PROTECTED]>
>
> Matteo Beccati <[EMAIL PROTECTED]> writes:
> > This also made me think: is there a reason why geometric selectivity
> > functions return constant values rather than checking statistics for a 
> > better result?
>
> Because no one's ever bothered to work on them.  You should talk to the
PostGIS guys, however, because they *have* been
> working on real statistics and real estimation functions for geometric
types.  It'd be nice to get some of that work
> back-ported into the core database.
>
> http://www.postgis.org/
>
>                       regards, tom lane


Hi Tom/Matteo,

As a PostGIS guy I can say that the latest geometric estimation functions
for the PostGIS 1.0 series are very good indeed - Sandro has done an
excellent job in working on a 2D histogram sample and it is surprising how
accurate the estimates are even with very low statistics targets.

Also, since Tom applied the ANALYZE patch for the 8.0 series, I've been
working on a new page for the PostgreSQL documentation explaining how the
ANALYZE process works, and gives an example using the complex type as to how
you can collect your own statistics during ANALYZE and make use of them from
your own selectivity functions. It's about three quarters complete, and
still in plain text format, but I hope to submit it as a documentation patch
for 8.1. My hope is that this will then encourage someone to add selectivity
functions to ltree and tsearch2 (hint hint) ;)


Kind regards,

Mark.

------------------------
WebBased Ltd
17 Research Way
Tamar Science Park
Plymouth
PL6 8BT 

T: +44 (0)1752 797131
F: +44 (0)1752 791023
W: http://www.webbased.co.uk
 



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to