Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHPyc-0002lJ-Q2 for pgsql-general@arkaria.postgresql.org; Wed, 22 Nov 2017 08:01:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHPyc-00044y-0d for pgsql-general@arkaria.postgresql.org; Wed, 22 Nov 2017 08:01:46 +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 1eHPyb-00044o-Qn for pgsql-general@lists.postgresql.org; Wed, 22 Nov 2017 08:01:45 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eHPyT-000554-Dj for pgsql-general@postgresql.org; Wed, 22 Nov 2017 08:01:45 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 5FF92993F122 for ; Wed, 22 Nov 2017 01:01:34 -0700 (MST) Date: Wed, 22 Nov 2017 01:01:34 -0700 (MST) From: legrand legrand To: pgsql-general@postgresql.org Message-ID: <1511337694391-0.post@n3.nabble.com> In-Reply-To: <20171122.101011.220214812.horiguchi.kyotaro@lab.ntt.co.jp> References: <1511218442722-0.post@n3.nabble.com> <1511292182893-0.post@n3.nabble.com> <20171122.101011.220214812.horiguchi.kyotaro@lab.ntt.co.jp> Subject: Re: One Partition by list is always chosen by planner MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, thank you for this answer. I just wanted to add a few informations. This table has in fact around 20 partitions, explain select * from wiki_data_part where category='fr' returns only 2 partitions (meaning that constraint_exclusion works) the partition that is always scanned has more than 100 distinct values in its partition list. After splitting this partition into 2 partitions the problem is gone ... For me this is as if the planner was not able to check partitions with too much values. There is no error with the query result, just a limited impact on performances. Regards PAscal -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html