Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 60AD6632421 for ; Mon, 30 Aug 2010 04:22:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 37854-05 for ; Mon, 30 Aug 2010 07:22:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from vs137086.vserver.de (static-ip-62-75-137-86.inaddr.intergenia.de [62.75.137.86]) by mail.postgresql.org (Postfix) with ESMTP id 6EA45632291 for ; Mon, 30 Aug 2010 04:22:37 -0300 (ADT) Received: (qmail 13740 invoked from network); 30 Aug 2010 09:22:35 +0200 Received: from p57aad753.dip.t-dialin.net (HELO a-kretschmer.de) (87.170.215.83) by static-ip-62-75-137-86.inaddr.intergenia.de with (AES256-SHA encrypted) SMTP; 30 Aug 2010 09:22:34 +0200 Received: from kretschmer by a-kretschmer.de with local (Exim 4.69) (envelope-from ) id 1OpyhK-0007Ta-MC for pgsql-performance@postgresql.org; Mon, 30 Aug 2010 09:22:30 +0200 Date: Mon, 30 Aug 2010 09:22:30 +0200 From: Andreas Kretschmer To: pgsql-performance@postgresql.org Subject: Re: Major performance problem after upgrade from 8.3 to 8.4 Message-ID: <20100830072230.GA28373@tux> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-GPG-Fingerprint: EE16 3C01 7B9C 10F7 2C8B 3B86 4DB3 D9EE 7F45 84DA X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! X-Lugdd: Gerd Kube X-Info: My name is root. Just root. And I am licensed to kill -9 User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.5 tagged_above=-10 required=5 tests=BAYES_05=-0.5 X-Spam-Level: X-Archive-Number: 201008/310 X-Sequence-Number: 40153 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? If yes, and if i where you, i would try to rewrite this query, to something like: select timestamp, sum (case when keyid = 1 then value else 0 end) as Raumsolltemperatur, ... from log group by timestamp; Assuming you can read a german text: http://www.pg-forum.de/h-ufig-gestellte-fragen-faq/4067-faq-zeilen-zu-spalten.html Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknown) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°