Re: An Idea for planner hints - Mailing list pgsql-hackers

From AgentM
Subject Re: An Idea for planner hints
Date
Msg-id CEC29079-8C81-40E2-AAEB-A8DB33DF0F08@themactionfaction.com
Whole thread Raw
In response to Re: An Idea for planner hints  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: An Idea for planner hints
List 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


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [PATCHES] Custom variable class segmentation fault
Next
From: Peter Eisentraut
Date:
Subject: Re: An Idea for planner hints