pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Willem Leenen <willem_leenen@hotmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Hints - experiences from other rdbms
Date: Wed, 21 Nov 2012 19:04:20 +0000
Message-ID: <DUB104-W33099C0518BEC1488C794D8F540@phx.gbl> (raw)
In-Reply-To: <50ACFBBD.30204@vmware.com>
References: <20121121134232.68590@gmx.com>
	<50ACFBBD.30204@vmware.com>




> 
> Rather than telling the planner what to do or not to do, I'd much rather 
> have hints that give the planner more information about the tables and 
> quals involved in the query. A typical source of bad plans is when the 
> planner gets its cost estimates wrong. So rather than telling the 
> planner to use a nested loop join for "a INNER JOIN b ON a.id = b.id", 
> the user could tell the planner that there are only 10 rows that match 
> the "a.id = b.id" qual. 



Instead of gathering statistics for all possible joins ( and join orders) , in Oracle there is a functionality that can be switched on where the optimizer is given cardinality feedback for the chosen plans, so it can choose another plan if the same statement comes around. 

Secondly, there is functionality to insert a hint into an SQL statement. That's very good for COTS apps where the statement can't be altered. Now I know that there's relatively not much COTS for the Postgresql, ( hence arguments like 'we should not implement hints so we're forcing people to solve the underlying problem' ), but as Postgresql will replace oracle in the lower end of the market, this functionality is usefull. 


 		 	   		  =

Message-ID: <DUB104-W33099C0518BEC1488C794D8F540@phx.gbl>
Permalink:  ../DUB104-W33099C0518BEC1488C794D8F540@phx.gbl/
Also on:    postgresql.org/message-id/DUB104-W33099C0518BEC1488C794D8F540@phx.gbl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: willem_leenen@hotmail.com
  Subject: Re: Hints - experiences from other rdbms
  In-Reply-To: <DUB104-W33099C0518BEC1488C794D8F540@phx.gbl>
  References: <20121121134232.68590@gmx.com> <50ACFBBD.30204@vmware.com> <DUB104-W33099C0518BEC1488C794D8F540@phx.gbl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox