Re: benchmarking the query planner - Mailing list pgsql-hackers

From ITAGAKI Takahiro
Subject Re: benchmarking the query planner
Date
Msg-id 20090319165210.D879.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: benchmarking the query planner  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: benchmarking the query planner  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> wrote:

> >> Works for me. Especially if you want to think more about ANALYZE before
> >> changing that.
> >
> > Well, it's something that would be sane to contemplate adding in 8.4.
> > It's way too late for any of this other stuff to happen in this release.
> 
> I'm thinking about trying to implement this, unless someone else is
> already planning to do it.  I'm not sure it's practical to think about
> getting this into 8.4 at this point, but it's worth doing whether it
> does or not.

Can we use get_relation_stats_hook on 8.4? The pg_statistic catalog
will be still modified by ANALYZEs, but we can rewrite the statistics
just before it is used.

your_relation_stats_hook(root, rte, attnum, vardata)
{   Call default implementation;   if (rte->relid = YourRelation && attnum = YourColumn)       ((Form_pg_statistic)
(vardata->statsTuple))->stadistinct= YourNDistinct;
 
}

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: gettext, plural form and translation
Next
From: Peter Eisentraut
Date:
Subject: Re: gettext, plural form and translation