Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 0A67DAB594F for ; Thu, 8 Dec 2011 23:28:32 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RYr8Q-0007rC-Hs for pgsql-performance@postgresql.org; Fri, 09 Dec 2011 03:28:31 +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 pB93SFek014558; Thu, 8 Dec 2011 22:28:15 -0500 (EST) To: kaloyan@digsys.bg cc: pgsql-performance@postgresql.org Subject: Re: Slow query after upgrade from 8.2 to 8.4 In-reply-to: <4EE0F3F4.8040909@digsys.bg> References: <4EE0F3F4.8040909@digsys.bg> Comments: In-reply-to Kaloyan Iliev Iliev message dated "Thu, 08 Dec 2011 19:29:24 +0200" Date: Thu, 08 Dec 2011 22:28:15 -0500 Message-ID: <14557.1323401295@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -3.1 (---) X-Archive-Number: 201112/77 X-Sequence-Number: 45876 Kaloyan Iliev Iliev writes: > We recently upgrade our server from PG8.2 to 8.4. > ... > Here I will post explain analyze. If you think it is necessary I will > post the exact query: > http://explain.depesz.com/s/J0O Yeah, you need to show the query. It looks like the performance problem is stemming from a lot of subselects, but it's not clear why 8.4 would be handling those worse than 8.2. regards, tom lane