pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jenny Zhang <jenny@osdl.org>
To: Matt Clark <matt@ymogen.net>
To: josh@agliodbs.com
Cc: perf-pgsql <pgsql-performance@postgresql.org>
Subject: Re: osdl-dbt3 run results - puzzled by the execution
Date: Thu, 18 Sep 2003 17:52:41 -0700
Message-ID: <1063932761.31150.90.camel@ibm-a.pdx.osdl.net> (raw)
In-Reply-To: <LFEIJBEOKGPDHCEMDGNFOEEKCDAA.matt@ymogen.net>
References: <LFEIJBEOKGPDHCEMDGNFOEEKCDAA.matt@ymogen.net>

Thanks for your prompt reply.

On Thu, 2003-09-18 at 16:19, Matt Clark wrote:
> > We thought the large effective_cache_size should lead us to better
> > plans. But we found the opposite.
> 
> Maybe it's inappropriate for little old me to jump in here, but the plan
> isn't usually that important compared to the actual runtime.  The links you
> give show the output of 'explain' but not 'explain analyze', so it's not
> clear wich plan is actually _faster_.
> 
I put the EXPLAIN ANALYZE output at:
http://developer.osdl.org/~jenny/large_explain_analyze
http://developer.osdl.org/~jenny/small_explain_analyze
The actual execution time is 37 seconds(large) vs 5 seconds (small).

I concluded the one with nested loop one is faster since we saw it
consistently faster than the merge join one in our runs.
> If you really do have only 8MB of FS cache, then either plan will run
> slowly.  If you really do have 5GB of FS cache then either plan will run a
> lot faster.  Why would you deliberately give the planner false information
> about this?
> 
We did not.  A little history of our runs:
When we first started, not knowing PG well, we just used the default ECS
value(1000). 
Then we realized since we have 8G of RAM, we should set ECS to 655360. 
But this leads the optimizer to pick a bad plan.  This is the reason why
we post this message.
> PG obviously thinks plan 1 is 'better' when pages have to be fetched from
> disk, and plan 2 is 'better' when they don't.  Which is really better
> depends on whether those pages do have to be fetched from disk or not, and
> PG can only know what you tell it about that, so changing ECS without
> actually removing the RAM from the system seems a little pointless to me...
> 
> M
> 
> 
> 
Regards,
Jenny




view thread (12+ messages)  latest in thread

Message-ID: <1063932761.31150.90.camel@ibm-a.pdx.osdl.net>
Permalink:  ../1063932761.31150.90.camel@ibm-a.pdx.osdl.net/
Also on:    postgresql.org/message-id/1063932761.31150.90.camel@ibm-a.pdx.osdl.net

 · 

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: jenny@osdl.org, matt@ymogen.net, josh@agliodbs.com
  Subject: Re: osdl-dbt3 run results - puzzled by the execution
  In-Reply-To: <1063932761.31150.90.camel@ibm-a.pdx.osdl.net>
  References: <LFEIJBEOKGPDHCEMDGNFOEEKCDAA.matt@ymogen.net> <1063932761.31150.90.camel@ibm-a.pdx.osdl.net>

* 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