pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Tambet Matiisen <t.matiisen@aprote.ee>
Cc: pgsql-performance@postgresql.org
Subject: Re: What about utility to calculate planner cost constants?
Date: Mon, 21 Mar 2005 09:51:06 -0800
Message-ID: <200503210951.06044.josh@agliodbs.com> (raw)
In-Reply-To: <A66A11DBF5525341AEF6B8DE39CDE77008805C@black.aprote.com>
References: <A66A11DBF5525341AEF6B8DE39CDE77008805C@black.aprote.com>

Tambet,

> I was following the cpu_tuple_cost thread and wondering, if it could be
> possible to make PQA style utility to calculate configuration-specific
> values for planner cost constants. It could make use of output of
> log_(statement|parser|planner|executor)_stats, tough I'm not sure if the
> output contains anything useful for those purposes.

Yeah, that's something I need to look at.

> Otherwise it could just collect statements, run EXPLAIN ANALYZE for all
> of them and then play with planner cost constants to get the estimated
> values as close as possible to actual values. Something like Goal Seek
> in Excel, if you pardon my reference to MS :).

That's not really practical.   There are currently 5 major query tuning 
parameters, not counting the memory adjustments which really can't be left 
out.  You can't realistically test all combinations of 6 variables.

> Somewhat similar project seems to be pgautotune from pgFoundry, but it
> only considers shared_buffers, sort_mem and vacuum_mem. And it seems to
> use synthetic data instead of actual database and actual statements from
> log. And it has been inactive for a while.

Yeah, pg_autotune is a dead project.   Once we got OSDL able to run tests, we 
came up with some rules-of-thumb which are more useful than autotune's 
output.  More importantly, the approach doesn't scale to the 15-20 GUCs which 
we'd realistically want to test.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco



view thread (21+ messages)  latest in thread

Message-ID: <200503210951.06044.josh@agliodbs.com>
Permalink:  ../200503210951.06044.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200503210951.06044.josh@agliodbs.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: josh@agliodbs.com, t.matiisen@aprote.ee
  Subject: Re: What about utility to calculate planner cost constants?
  In-Reply-To: <200503210951.06044.josh@agliodbs.com>

* 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