Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 1521019713C8 for ; Tue, 6 Dec 2011 16:01:06 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RY1CK-0001Qe-Aj for pgsql-performance@postgresql.org; Tue, 06 Dec 2011 20:01:05 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id pB6K0nUH014290; Tue, 6 Dec 2011 15:00:49 -0500 (EST) To: Mario Splivalo cc: "pgsql-performance@postgresql.org" Subject: Re: Different query plans on same servers In-reply-to: <4EDE717A.9050604@megafon.hr> References: <4EDE717A.9050604@megafon.hr> Comments: In-reply-to Mario Splivalo message dated "Tue, 06 Dec 2011 20:48:10 +0100" Date: Tue, 06 Dec 2011 15:00:49 -0500 Message-ID: <14289.1323201649@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -3.1 (---) X-Archive-Number: 201112/46 X-Sequence-Number: 45845 Mario Splivalo writes: > I have 8.4.8 on producion and 8.4.9 on test, could that explain the > difference in plans chosen? I'd wonder first if you have the same statistics settings on both. The big problem here is that the estimation of the join size is bad (8588 versus 0). regards, tom lane