Re: query plan different for "SELECT ..." and "DECLARE

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Blasby <dblasby(at)refractions(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: query plan different for "SELECT ..." and "DECLARE
Date: 2003-10-02 17:10:01
Message-ID: 3F7C5BE9.5040107@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> David Blasby <dblasby(at)refractions(dot)net> writes:
>>The only real problem is that the user has to manual keep stats
>>up-to-date. Is there anyway to attach something to VACUUM ANALYSE?
>
> The ANALYZE code is set up with the idea that there could be multiple
> analysis methods and various kinds of stuff stored in pg_statistic.
> Right now there isn't any way to physically plug in a different analysis
> routine :-( but it seems like it'd be reasonable to add some hook of
> that kind. Perhaps CREATE TYPE could be extended to specify an analysis
> routine for ANALYZE to call for columns of that type.
>
> Please take a look at pg_statistic.h and commands/analyze.c and see if
> this would do the job for you. Obviously it's too late for 7.4 but we
> could think about a solution in 7.5.
>

It would be interesting if a PL/R function could be plugged in for both
the ANALYZE function and the selectivity function. There are quite a few
spatial data related packages available for R; one of them might fit
nicely for this application.

Joe

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2003-10-02 17:47:06 Re: Thoughts on maintaining 7.3
Previous Message Tom Lane 2003-10-02 16:44:32 Re: query plan different for "SELECT ..." and "DECLARE CURSOR ..."?