Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5L2qba71036 for ; Wed, 20 Jun 2001 22:52:37 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id f5L2qS311776; Wed, 20 Jun 2001 22:52:28 -0400 (EDT) To: "Ross J. Reedstrom" cc: Rainer Mager , PostgreSQL Admin Subject: Re: High memory usage In-reply-to: <20010620103554.C1496@rice.edu> References: <20010620103554.C1496@rice.edu> Comments: In-reply-to "Ross J. Reedstrom" message dated "Wed, 20 Jun 2001 10:35:55 -0500" Date: Wed, 20 Jun 2001 22:52:28 -0400 Message-ID: <11773.993091948@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200106/144 X-Sequence-Number: 1711 "Ross J. Reedstrom" 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