Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cLuGX-0005nq-Dn for pgsql-performance@arkaria.postgresql.org; Tue, 27 Dec 2016 16:06:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cLuGX-0004SQ-0U for pgsql-performance@arkaria.postgresql.org; Tue, 27 Dec 2016 16:06: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_2) (envelope-from ) id 1cLuEr-0002TW-Dk for pgsql-performance@postgresql.org; Tue, 27 Dec 2016 16:04:33 +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_2) (envelope-from ) id 1cLuEn-0008PU-OB for pgsql-performance@postgresql.org; Tue, 27 Dec 2016 16:04:32 +0000 Received: from mailin04.ims-firmen.de ([192.168.1.144]) by mailout02.ims-firmen.de with esmtp (envelope-from ) id 1cLuEm-0001Yw-kG for pgsql-performance@postgresql.org; Tue, 27 Dec 2016 17:04:28 +0100 Received: from [79.204.182.49] (helo=a-kretschmer.de) by mailin04.ims-firmen.de with esmtpsa (TLSv1:AES256-SHA:256) (envelope-from ) id 1cLuEm-0000Jb-AN for pgsql-performance@postgresql.org; Tue, 27 Dec 2016 17:04:28 +0100 Received: from kretschmer by a-kretschmer.de with local (Exim 4.69) (envelope-from ) id 1cLuEl-0000qY-RW for pgsql-performance@postgresql.org; Tue, 27 Dec 2016 17:04:27 +0100 Date: Tue, 27 Dec 2016 17:04:27 +0100 From: Andreas Kretschmer To: pgsql-performance@postgresql.org Subject: Re: why we do not create indexes on master Message-ID: <20161227160427.GA2843@tux> References: <01F901FD-F29D-4A46-ACB4-4E6FD75EE7E6@mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <01F901FD-F29D-4A46-ACB4-4E6FD75EE7E6@mail.ru> 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: -3.3 (---) 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 Valerii Valeev wrote: > Dear colleagues, > > can anyone please explain, why we do not create indexes on master? > In my case master / child design blindly follows partitioning guide https:// > www.postgresql.org/docs/9.6/static/ddl-partitioning.html. > My collaborator was unhappy with performance of queries over master table with > filtering by one of fields > > SELECT * FROM “master" WHERE “field" BETWEEN x AND y > > (there are indexes for “field” on child tables). > He has created index on master once and found that the query returns 100x > faster. please show us explain analyse with/without index on master. Regards, Andreas Kretschmer -- Andreas Kretschmer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance