pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Nested loops overpriced
Date: Thu, 10 May 2007 17:35:06 +0200
Message-ID: <200705101735.06509.peter_e@gmx.net> (raw)
In-Reply-To: <28620.1178732406@sss.pgh.pa.us>
References: <200705081722.16731.peter_e@gmx.net>
	<200705091817.45056.peter_e@gmx.net>
	<28620.1178732406@sss.pgh.pa.us>

Am Mittwoch, 9. Mai 2007 19:40 schrieb Tom Lane:
> Hmmm ... I see at least part of the problem, which is that email_header
> is joined twice in this query, which means that it's counted twice in
> figuring the total volume of pages competing for cache space.  So the
> thing thinks cache space is oversubscribed nearly 3X when in reality
> the database is fully cached.

I should add that other, similar queries in this database that do not involve 
joining the same table twice produce seemingly optimal plans.  (It picks hash 
joins which are actually faster than nested loops.)

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/



view thread (12+ messages)  latest in thread

Message-ID: <200705101735.06509.peter_e@gmx.net>
Permalink:  ../200705101735.06509.peter_e@gmx.net/
Also on:    postgresql.org/message-id/200705101735.06509.peter_e@gmx.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: peter_e@gmx.net, tgl@sss.pgh.pa.us
  Subject: Re: Nested loops overpriced
  In-Reply-To: <200705101735.06509.peter_e@gmx.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