pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ross J. Reedstrom <reedstrm@rice.edu>
Cc: Rainer Mager <rmager@vgkk.com>
Cc: PostgreSQL Admin <pgsql-admin@postgresql.org>
Subject: Re: High memory usage
Date: Wed, 20 Jun 2001 22:52:28 -0400
Message-ID: <11773.993091948@sss.pgh.pa.us> (raw)
In-Reply-To: <20010620103554.C1496@rice.edu>
References: <NEBBJBCAFMMNIHGDLFKGCEFOEFAA.rmager@vgkk.com>
	<20010620103554.C1496@rice.edu>

"Ross J. Reedstrom" <reedstrm@rice.edu> writes:
> My guess is it's an interaction of the optimizer with the plan for this
> query, which might have many, nearly identical cost plans, since 8 of
> the 9 tables are actually the same table.

Yes, I suspect the same.  A large fraction of the possible subplans
would have exactly identical costs, which would keep the planner from
discarding any of them (normally, it drops clearly-inferior subplans
instantly, which does a great deal to limit exponential search
behavior).  It doesn't help any that the WHERE conditions are all
so similar, either.

I have a strong suspicion that the database schema is poorly thought
out, but lacking any concrete info, it's hard to offer suggestions
for improvement.

			regards, tom lane



view thread (11+ messages)  latest in thread

Message-ID: <11773.993091948@sss.pgh.pa.us>
Permalink:  ../11773.993091948@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11773.993091948@sss.pgh.pa.us

 · 

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-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, reedstrm@rice.edu, rmager@vgkk.com
  Subject: Re: High memory usage
  In-Reply-To: <11773.993091948@sss.pgh.pa.us>
  References: <NEBBJBCAFMMNIHGDLFKGCEFOEFAA.rmager@vgkk.com> <20010620103554.C1496@rice.edu> <11773.993091948@sss.pgh.pa.us>

* 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