Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZnE4Y-0005ky-Uz for pgsql-performance@arkaria.postgresql.org; Fri, 16 Oct 2015 23:06:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZnE4X-0005ik-FW for pgsql-performance@arkaria.postgresql.org; Fri, 16 Oct 2015 23:06:01 +0000 Received: from makus.postgresql.org ([174.143.35.229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZnE2u-0003qC-N8 for pgsql-performance@postgresql.org; Fri, 16 Oct 2015 23:04:20 +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) (envelope-from ) id 1ZnE0o-0004Wv-PW for pgsql-performance@postgresql.org; Fri, 16 Oct 2015 23:02:12 +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 t9GN28FS004322; Fri, 16 Oct 2015 19:02:08 -0400 From: Tom Lane To: Vladimir Yavoskiy cc: pgsql-performance@postgresql.org Subject: Re: query partitioned table is very slow In-reply-to: <5621740E.3010002@krevedko.su> References: <5621740E.3010002@krevedko.su> Comments: In-reply-to Vladimir Yavoskiy message dated "Sat, 17 Oct 2015 01:02:54 +0300" Date: Fri, 16 Oct 2015 19:02:08 -0400 Message-ID: <4321.1445036528@sss.pgh.pa.us> X-Pg-Spam-Score: -0.2 (/) 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 Vladimir Yavoskiy writes: > I have about 900 partitioned tables with 67 millons rows. > And I found that my query takes too much time! That's about 100X partitions too many for that amount of rows. Partitions are a good thing in small doses, otherwise planning time will kill you. 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