Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xgcdv-0001Um-0W for pgsql-performance@arkaria.postgresql.org; Tue, 21 Oct 2014 16:50:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xgcdu-00085d-HT for pgsql-performance@arkaria.postgresql.org; Tue, 21 Oct 2014 16:50:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xgcdt-00085X-Q1 for pgsql-performance@postgresql.org; Tue, 21 Oct 2014 16:50:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xgcdq-0003VN-ET for pgsql-performance@postgresql.org; Tue, 21 Oct 2014 16:50:40 +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 s9LGoW1E006156; Tue, 21 Oct 2014 12:50:32 -0400 From: Tom Lane To: Marco Di Cesare cc: Merlin Moncure , "pgsql-performance@postgresql.org" Subject: Re: Query with large number of joins In-reply-to: <0a72826fe7d04b71b9ab47d24992d898@CO2PR0701MB759.namprd07.prod.outlook.com> References: <0a72826fe7d04b71b9ab47d24992d898@CO2PR0701MB759.namprd07.prod.outlook.com> Comments: In-reply-to Marco Di Cesare message dated "Tue, 21 Oct 2014 16:09:40 -0000" Date: Tue, 21 Oct 2014 12:50:32 -0400 Message-ID: <6155.1413910232@sss.pgh.pa.us> 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 Marco Di Cesare writes: > COUNT(DISTINCT "foxtrot_india"."bravo_romeo") Ah. That explains why the planner doesn't want to use a hash aggregation step --- DISTINCT aggregates aren't supported with those. 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