X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D6D4F9FA103 for ; Wed, 13 Sep 2006 18:09:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 92144-04 for ; Wed, 13 Sep 2006 18:09:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 34E479FA0EF for ; Wed, 13 Sep 2006 18:09:49 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k8DL9iFQ016646; Wed, 13 Sep 2006 17:09:45 -0400 (EDT) To: "Joshua Marsh" cc: "Terje Elde" , "Jeff Davis" , pgsql-performance@postgresql.org, jim@nasby.net Subject: Re: Performance With Joins on Large Tables In-reply-to: <38242de90609131327o68d2866fh92c12ddcf364aba7@mail.gmail.com> References: <38242de90609121517y62517040v8622b9ae93cba23d@mail.gmail.com> <20060913064152.GC23173@nasby.net> <38242de90609130749u976295fwb10904ff4797b920@mail.gmail.com> <1158163655.29889.57.camel@dogma.v10.wvs> <38242de90609130919k33208204ka1006ff0ca25f75b@mail.gmail.com> <1158167054.29889.72.camel@dogma.v10.wvs> <45085F3A.1040108@elde.net> <38242de90609131327o68d2866fh92c12ddcf364aba7@mail.gmail.com> Comments: In-reply-to "Joshua Marsh" message dated "Wed, 13 Sep 2006 14:27:47 -0600" Date: Wed, 13 Sep 2006 17:09:44 -0400 Message-ID: <16645.1158181784@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.108 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/135 X-Sequence-Number: 20821 "Joshua Marsh" writes: > I have a suspision that pgsql isn't tuned to properly deal with tables > of this size. Actually, it is. Most of the planner complaints we get are from people whose tables fit in memory and they find that the default planner behavior doesn't apply real well to that case. I find your indexscan-is-faster-than-sort results pretty suspicious for large tables. Are the tables perhaps nearly in order by the dsiacctno fields? If that were the case, and the planner were missing it for some reason, these results would be plausible. BTW, what are you using for work_mem, and how does that compare to your available RAM? regards, tom lane