Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id BADE319713C9 for ; Tue, 6 Dec 2011 20:26:07 -0400 (AST) Received: from out1.mail.amis.hr ([188.129.0.4]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RY5Kn-0006Ri-9P for pgsql-performance@postgresql.org; Wed, 07 Dec 2011 00:26:06 +0000 Received: from out.fsec.sm.srv.amis.hr (out.fsec.sm.srv.amis.hr [192.168.106.22]) by out1.mail.amis.hr (Postfix) with ESMTP id 79C141FC98 for ; Wed, 7 Dec 2011 01:25:52 +0100 (CET) Received: from pps.filterd (out [127.0.0.1]) by out.fsec.sm.srv.amis.hr (8.14.3/8.14.3) with SMTP id pB70PqFK030370 for ; Wed, 7 Dec 2011 01:25:52 +0100 Received: from smtp.amis.hr (smtp.sm.srv.amis.hr [192.168.106.39]) by out.fsec.sm.srv.amis.hr with ESMTP id 11hmqcr5ba-1 for ; Wed, 07 Dec 2011 01:25:52 +0100 A-Original-Client-UID: 188.129.104.49 splivalo Received: from [192.168.10.1] (cpe-188-129-104-49.dynamic.amis.hr [188.129.104.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: splivalo) by smtp.amis.hr (Postfix) with ESMTPSA id 1CD8C270 for ; Wed, 7 Dec 2011 01:25:52 +0100 (CET) Message-ID: <4EDEB21D.3030703@megafon.hr> Date: Wed, 07 Dec 2011 01:23:57 +0100 From: Mario Splivalo User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Different query plans on same servers References: <4EDE717A.9050604@megafon.hr> <14289.1323201649@sss.pgh.pa.us> In-Reply-To: <14289.1323201649@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110, 1.0.211, 0.0.0000 definitions=2011-12-06_05:2011-12-06, 2011-12-06, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1012030000 definitions=main-1112060282 X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201112/50 X-Sequence-Number: 45849 On 12/06/2011 09:00 PM, Tom Lane wrote: > 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). They do, I guess. I did rsync postgres datadir from the prod server to the test server. The only difference is that prod server was a bit more loaded than the test server. Mario