Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXqNU-0004JE-41 for pgsql-performance@arkaria.postgresql.org; Thu, 11 Aug 2016 13:50:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bXqNT-0006YS-IF for pgsql-performance@arkaria.postgresql.org; Thu, 11 Aug 2016 13:50:31 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bXqNT-0006YM-4O for pgsql-performance@postgresql.org; Thu, 11 Aug 2016 13:50:31 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bXqNQ-0003Ab-RI for pgsql-performance@postgresql.org; Thu, 11 Aug 2016 13:50:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u7BDoRri029013; Thu, 11 Aug 2016 09:50:27 -0400 From: Tom Lane To: Andrey Zhidenkov cc: pgsql-performance@postgresql.org Subject: Re: Planner do seq scan on empty master partitioned table In-reply-to: References: Comments: In-reply-to Andrey Zhidenkov message dated "Thu, 11 Aug 2016 13:46:47 +0300" Date: Thu, 11 Aug 2016 09:50:27 -0400 Message-ID: <29012.1470923427@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) 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 Andrey Zhidenkov writes: > I have a table (registry.entry) which has ~ 100 inherited tables. This > is a master table and it's empty: As long as it's empty, a seqscan should be essentially free. Don't worry about it. And definitely don't create indexes, that will just add cost. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance