Skip site navigation (1) Skip section navigation (2)

Re: The use of cpu_index_tuple_cost by the query planner

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Antonio Carlos Salzvedel Furtado Junior <acsfj08(at)inf(dot)ufpr(dot)br>, pgsql-novice(at)postgresql(dot)org
Subject: Re: The use of cpu_index_tuple_cost by the query planner
Date: 2012-06-27 23:22:06
Message-ID: 1340839326.32226.3.camel@sussancws0025 (view raw or flat)
Thread:
Lists: pgsql-novice
On Wed, 2012-06-27 at 21:37 +0100, Simon Riggs wrote:
> On 27 June 2012 21:28, Antonio Carlos Salzvedel Furtado Junior
> <acsfj08(at)inf(dot)ufpr(dot)br> wrote:
> 
> > I'm trying to understand the use of PostgreSQL tuning parameters by the
> > query planner's cost estimator. I'm trying to use simple queries to
> > understand how these parameters would affect the estimated cost. However, I
> > haven't still been able to see the cpu_index_tuple_cost.
> 
> Your best hope is to read the source code. Things will become much clearer.

Right, the cost model is too complex to really understand just running
EXPLAIN.

The tuning parameters are translated to global variables
in ./src/backend/utils/misc/guc.c. From there, you can search for
references to the global variables (often with very similar names to the
tuning parameter) and find out how they are used in the cost model.

Regards,
	Jeff Davis


In response to

Responses

pgsql-novice by date

Next:From: Jeff DavisDate: 2012-06-27 23:33:51
Subject: Re: Function Scan costs
Previous:From: Simon RiggsDate: 2012-06-27 20:37:31
Subject: Re: The use of cpu_index_tuple_cost by the query planner

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group