Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 96FED632CA5 for ; Mon, 30 Aug 2010 13:13:31 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 84694-04 for ; Mon, 30 Aug 2010 16:13:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from fep19.mx.upcmail.net (fep19.mx.upcmail.net [62.179.121.39]) by mail.postgresql.org (Postfix) with ESMTP id BD658632E2A for ; Mon, 30 Aug 2010 13:13:23 -0300 (ADT) Received: from edge02.upcmail.net ([192.168.13.237]) by viefep19-int.chello.at (InterMail vM.8.01.02.02 201-2260-120-106-20100312) with ESMTP id <20100830161321.NNND17503.viefep19-int.chello.at@edge02.upcmail.net>; Mon, 30 Aug 2010 18:13:21 +0200 Received: from wiesinger.com ([84.112.167.138]) by edge02.upcmail.net with edge id 0gDH1f00Y2zVakc02gDJW5; Mon, 30 Aug 2010 18:13:20 +0200 X-SourceIP: 84.112.167.138 Received: from bbs.intern (localhost [127.0.0.1]) by wiesinger.com (8.14.4/8.14.4) with ESMTP id o7UGBcl0032052; Mon, 30 Aug 2010 18:11:38 +0200 Received: from localhost (gerhard@localhost) by bbs.intern (8.14.4/8.14.4/Submit) with ESMTP id o7UGBapL032048; Mon, 30 Aug 2010 18:11:36 +0200 Date: Mon, 30 Aug 2010 18:11:36 +0200 (CEST) From: Gerhard Wiesinger To: Pavel Stehule cc: Andreas Kretschmer , pgsql-performance@postgresql.org Subject: Re: Major performance problem after upgrade from 8.3 to 8.4 In-Reply-To: Message-ID: References: <20100830072230.GA28373@tux> User-Agent: Alpine 2.01 (LFD 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-MailScanner-Information-wiesinger-com: Please contact the ISP for more information X-wiesinger-com-MailScanner-ID: o7UGBcl0032052 X-MailScanner-wiesinger-com: Found to be clean X-MailScanner-SpamCheck-wiesinger-com: not spam, SpamAssassin (not cached, score=-4.399, required 4.5, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60) X-MailScanner-From: lists@wiesinger.com X-Cloudmark-Analysis: v=1.1 cv=V15LrGZDFsIOLQGhFSBQucROxfiwgIeIJ7AmZ+xKGd4= c=1 sm=0 a=-BBt41PQAQkA:10 a=ORa4HqFjfvEA:10 a=kj9zAlcOel0A:10 a=-ProOGmuAAAA:8 a=ZqxAMWuMAAAA:8 a=cb1hTWWLqVdPGLaiHbQA:9 a=t1PecxabmvaogJNoKvkA:7 a=0rGwIRHMTgLCoP3JYIb7GOGWbcsA:4 a=CjuIK1q_8ugA:10 a=fU-A4pz3-wIA:10 a=25N3bAZzUGoA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201008/330 X-Sequence-Number: 40173 On Mon, 30 Aug 2010, Pavel Stehule wrote: > 2010/8/30 Gerhard Wiesinger : >> On Mon, 30 Aug 2010, Pavel Stehule wrote: >> >>> Hello >>> >>> 2010/8/30 Andreas Kretschmer : >>>> >>>> Gerhard Wiesinger wrote: >>>> >>>>> I know that the data model is key/value pairs but it worked well in 8.3. >>>>> I need this flexibility. >>>>> >>>>> Any ideas? >>>> >>>> If i understand the query correctly it's a pivot-table, right? >>>> >>> >>> no - it's just EAV table on very large data :( >> >> Yes, it is an EAV table, but with query space comparable low (Max. 1 day out >> of years, typically 5mins out of years). >> > > it is irelevant - there are repeated seq scans - so you need a > partitioning or classic table - maybe materialized views can help I know the drawbacks of an EAV design but I don't want to discuss that. I want to discuss the major performance decrease of PostgreSQL 8.3 (performance was ok) to PostgreSQL 8.4 (performance is NOT ok). Any further ideas how I can track this down? Can someone explain the difference in query plan from an optimizer point of view? Thnx. Ciao, Gerhard -- http://www.wiesinger.com/