Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E20251337B56 for ; Sat, 4 Dec 2010 14:20:39 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 56813-09 for ; Sat, 4 Dec 2010 18:20:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.tastatur-junkie.de (static.206.114.40.188.clients.your-server.de [188.40.114.206]) by mail.postgresql.org (Postfix) with ESMTP id 9923D1337999 for ; Sat, 4 Dec 2010 14:20:32 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by mail.tastatur-junkie.de (Postfix) with ESMTP id BD5C3F302DE; Sat, 4 Dec 2010 19:20:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.tastatur-junkie.de Received: from mail.tastatur-junkie.de ([127.0.0.1]) by localhost (st90.tastatur-junkie.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LylzRFEcLg4b; Sat, 4 Dec 2010 19:20:31 +0100 (CET) Received: from niasmobil.localnet (cotb-4d05be51.pool.mediaWays.net [77.5.190.81]) by mail.tastatur-junkie.de (Postfix) with ESMTPSA; Sat, 4 Dec 2010 19:20:30 +0100 (CET) From: Markus Schulz Organization: AntzSystem GmbH To: pgsql-performance@postgresql.org Subject: Re: problem with from_collapse_limit and joined views Date: Sat, 4 Dec 2010 19:20:28 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.36-trunk-686; KDE/4.4.5; i686; ; ) Cc: "Kevin Grittner" References: <4CFA09E2020000250003829C@gw.wicourts.gov> In-Reply-To: <4CFA09E2020000250003829C@gw.wicourts.gov> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201012041920.29616@Mail-Followup-To> 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 X-Spam-Level: X-Archive-Number: 201012/40 X-Sequence-Number: 41492 Am Samstag 04 Dezember 2010 schrieb Kevin Grittner: > One option would be to create a different user for running queries > which read from complex views such as this. > > postgres=# create user bob; > CREATE ROLE > postgres=# alter user bob set from_collapse_limit = 40; > ALTER ROLE > postgres=# alter user bob set join_collapse_limit = 40; > ALTER ROLE > > Log in as bob, and your queries should run fine. thanks, that was really an option for us to use a different user for creating the reports. > Nothing leapt out at me as an issue in your postgresql.conf except: > > max_prepared_transactions = 20 > > Do you actually use prepared transactions? (Sometimes people confuse > this with prepared statements, which are a completely different > feature.) yes, they are needed for our JPA-based j2ee application. regards msc