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 16:33:07
Message-ID: CEC29079-8C81-40E2-AAEB-A8DB33DF0F08@themactionfaction.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Aug 15, 2006, at 12:26 , Peter Eisentraut wrote:

> AgentM wrote:
>> I've always found it odd that database didn't determine which
>> statistics are the most interesting from the queries themselves.
>
> The overhead of doing that on the fly is probably prohibitive. More
> explicit profiling support could be helpful, but that would seem a lot
> more complicated than, say, a compiler profiling tool that merely has
> to sort out the branch predictions.

Couldn't the session be explicitly transferred into a special
analysis mode? Explain analyze could run on every query implicitly
and point out time and row count discrepancies as HINTs. Multi-column
joins, for example, could be pointed out and display whether or not
there are related indexes.

Then, I imagine, I would regularly run all my app's prepared queries
through this analysis mode to see what I could improve. Who knows the
database better than itself?

-M

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2006-08-15 17:00:49 Re: An Idea for planner hints
Previous Message Peter Eisentraut 2006-08-15 16:30:32 Re: [PATCHES] Custom variable class segmentation fault