Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aGrnp-0006ld-HQ for pgsql-performance@arkaria.postgresql.org; Wed, 06 Jan 2016 17:23:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aGrno-00081h-Vh for pgsql-performance@arkaria.postgresql.org; Wed, 06 Jan 2016 17:23:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aGrno-00081Y-KY for pgsql-performance@postgresql.org; Wed, 06 Jan 2016 17:23:16 +0000 Received: from mailout02.ims-firmen.de ([213.174.32.97]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aGrng-0003dO-VU for pgsql-performance@postgresql.org; Wed, 06 Jan 2016 17:23:16 +0000 Received: from mailin01.ims-firmen.de ([192.168.1.141]) by mailout02.ims-firmen.de with esmtp (envelope-from ) id 1aGrnf-0002MG-lx for pgsql-performance@postgresql.org; Wed, 06 Jan 2016 18:23:07 +0100 Received: from [79.204.136.125] (helo=a-kretschmer.de) by mailin01.ims-firmen.de with esmtpsa (TLSv1:AES256-SHA:256) (envelope-from ) id 1aGrnf-0001C5-2S for pgsql-performance@postgresql.org; Wed, 06 Jan 2016 18:23:07 +0100 Received: from kretschmer by a-kretschmer.de with local (Exim 4.69) (envelope-from ) id 1aGrnf-000289-AS for pgsql-performance@postgresql.org; Wed, 06 Jan 2016 18:23:07 +0100 Date: Wed, 6 Jan 2016 18:23:07 +0100 From: Andreas Kretschmer To: pgsql-performance@postgresql.org Subject: Re: Materialized view performance problems Message-ID: <20160106172307.GA7532@tux> References: <573633884.42831.1452080416423.JavaMail.open-xchange@oxweb01.ims-firmen.de> 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-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Tom McLoughlin wrote: > Thank you very much for your help. > > It's difficult for me to run analyse explain for the query given because it > takes so long. However, the query below has a similar structure but has less > data to process. Seems okay, but it's better to analyse that for the real query. You can install the auto_explain - module and enable auto_explain.log_analyze and set auto_explain.log_min_duration to a proper value. You can find later the explain analse - ouput in the log. Consider all steps mit seq-scans, but as i see all seq-scan are on small tables and the majority of rows are in the result, so an index can't help much. 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° -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance