Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id EAD849F939F for ; Tue, 2 Jan 2007 08:45:27 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 69058-03 for ; Tue, 2 Jan 2007 08:45:16 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from web26301.mail.ukl.yahoo.com (web26301.mail.ukl.yahoo.com [217.146.176.12]) by postgresql.org (Postfix) with SMTP id CA8D79F938C for ; Tue, 2 Jan 2007 08:45:20 -0400 (AST) Received: (qmail 1505 invoked by uid 60001); 2 Jan 2007 12:45:18 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.no; h=Message-ID:X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=jFuh9XtZc1NhEnygthQGwhbF8Rsw+7py6tcEkot8tXtDdNg9jWfu1thkqreyDYz6PxJ40RJZjudcCg6TwnG6gDo2phvMLEaC+cdKsOquoDd5CGl9+T3mQaT3VKOju0G2DlLPUoUks6NLuXT5Jq95oXTgRh62YYMnK8ka9An4oHs= ; Message-ID: <20070102124518.1503.qmail@web26301.mail.ukl.yahoo.com> X-YMail-OSG: JRC1t9gVM1kKX0NjgybzucZgaPeBQD0RJOWfQnYA6OMYCZl_iGl26zsabfeTxbDQQmQcde2ldGgU3_PFX_5J1RVS4BS12vg8xMDu2F570JxuxSOfAyUVqQUzFBEUZaWmeVe93c7VPqya2KAz00mjZl0UhBE2Xf2QUzSSwVbJ4JsdP7JxlNeKhUkyHg-- Received: from [81.175.5.65] by web26301.mail.ukl.yahoo.com via HTTP; Tue, 02 Jan 2007 13:45:18 CET Date: Tue, 2 Jan 2007 13:45:18 +0100 (CET) From: =?iso-8859-1?q?Rolf=20=D8stvik?= Subject: Re: Worse perfomance on 8.2.0 than on 7.4.14 To: Tom Lane Cc: pgsql-performance@postgresql.org In-Reply-To: <21166.1167694227@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/10 X-Sequence-Number: 22611 --- Tom Lane skrev: > =?iso-8859-1?q?Rolf=20=D8stvik?= > writes: > > First i have some queries to give you a feel of > size > > of datasets and plans and times. > > You said earlier that essentially all the rows of > step_result_subset > have step_parent = 0 ... is that really true? Not true, but i am sorry if it could be intepreted that way. What i tried to say was step_result_subset contain 17 179 506 rows uut_Result_subset contain 176 555 rows There is one entry in step_result_subset with the condition step_parent = 0 for each entry in uut_result_subset (there is 176 555 rows in step_result_subset which have step_parent = 0). For this (sample) query i have found that if i select just a little bigger data set (setting start_date_time to an earlier date) the plan selected by the server does the best job and gives a more stable execution time independent of size of data sets. I also have found that my theories of the best solution has been wrong. If you (Tom) still want me to do the following steps then please tell me. > I can > hardly believe > that either 7.4 or 8.2 would use an indexscan for > Q-A if so. > > I'd be interested to see the results of > > prepare foo(int) as select id from > step_result_subset sr > where uut_result = $1 and step_parent = 0; > explain analyze execute foo(42); > > (use some representative uut_result value instead of > 42). If it doesn't > want to use an indexscan for this, disable plan > types until it does. > This would perhaps shed some light on why 8.2 > doesn't want to use a scan > like that as the inside of a nestloop. > > regards, tom lane > Best regards Rolf Østvik __________________________________________________ Bruker du Yahoo!? Lei av spam? Yahoo! Mail har den beste spambeskyttelsen http://no.mail.yahoo.com