Re: An Idea for planner hints

From: AgentM <agentm(at)themactionfaction(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: An Idea for planner hints
Date: 2006-08-15 14:53:14
Message-ID: 41EB4E79-4DE0-4A40-99EC-9AA1B69C6BB8@themactionfaction.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Aug 15, 2006, at 10:40 , Jim C. Nasby wrote:
>
> Yeah, unless someone comes up with some kind of 'magic', I think
> trying
> to handle every cross-column possibility is a non-starter. IIRC, that
> argument is what's stalled cross-column stats every time in the
> past. It
> makes a lot more sense to allow defining what combinations of
> columns we
> need stats for.
>
> After that's done, it'd be easy to then write a script that will tell
> the database to collect stats on all multi-column indexes, RI, etc.
> Down
> the road, the planner could even be made to log (in a machine-readable
> format) every time it needs cross-column stats, and that data could be
> used to add stats that are needed.

I've always found it odd that database didn't determine which
statistics are the most interesting from the queries themselves. At
the very least, the database could make suggestions: "It looks like
this prepared query which is used often could benefit from an index
on x(a,b,c)." That would be better than me guessing.

-M

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2006-08-15 15:09:32 Re: [PATCHES] Custom variable class segmentation fault
Previous Message Jim C. Nasby 2006-08-15 14:52:03 Re: Weird idea for pg_stat_activity