From: "Mark Cave-Ayland" <m(dot)cave-ayland(at)webbased(dot)co(dot)uk>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <php(at)beccati(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>, "'Oleg Bartunov'" <oleg(at)sai(dot)msu(dot)su>, "'Teodor Sigaev'" <teodor(at)sigaev(dot)ru>
Subject:
Date: 2005-08-05 08:26:38
Message-ID: 9EB50F1A91413F4FA63019487FCD251D11349F@WEBBASEDDC.webbasedltd.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> Date: Thu, 04 Aug 2005 11:12:58 -0400
> From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> To: Matteo Beccati <php(at)beccati(dot)com>
> Cc: pgsql-hackers(at)postgresql(dot)org
> Subject: Re: Enhanced containment selectivity function
> Message-ID: <15936(dot)1123168378(at)sss(dot)pgh(dot)pa(dot)us>
>
> Matteo Beccati <php(at)beccati(dot)com> 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

Browse pgsql-hackers by date

  From Date Subject
Next Message Kenneth Marshall 2005-08-05 12:20:02 Re: [HACKERS] MySQL to PostgreSQL for SugarCRM
Previous Message yuanjia lee 2005-08-05 07:28:39 test