Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T1lON-0007Lf-Ug for pgsql-performance@postgresql.org; Wed, 15 Aug 2012 21:44:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T1lOL-0002hw-JX for pgsql-performance@postgresql.org; Wed, 15 Aug 2012 21:44:43 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q7FLibHY020521; Wed, 15 Aug 2012 17:44:37 -0400 (EDT) From: Tom Lane To: Josh Berkus cc: pgsql-performance@postgresql.org Subject: Re: 7k records into Sort node, 4.5m out? In-reply-to: <502C0E6B.1040402@agliodbs.com> References: <32B51AEA-E940-40CF-BA54-C7D4E3E1F0D7@thebuild.com> <10304.1344910305@sss.pgh.pa.us> <623F2FF3-B79D-419A-929A-41C707DD5EA3@thebuild.com> <16268.1345063872@sss.pgh.pa.us> <502C0E6B.1040402@agliodbs.com> Comments: In-reply-to Josh Berkus message dated "Wed, 15 Aug 2012 14:02:35 -0700" Date: Wed, 15 Aug 2012 17:44:36 -0400 Message-ID: <20520.1345067076@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201208/90 X-Sequence-Number: 47628 Josh Berkus writes: > On 8/15/12 1:51 PM, Tom Lane wrote: >> Maybe you had better show us the actual query, and the table/index >> definitions. Because it's sure making odd choices here. This seems >> like the wrong join order altogether ... > We'll need to do that off-list for confidentiality reasons. If you can show us the anonymized query plan, why not the anonymized query? It doesn't look like it could be all that complicated. regards, tom lane