Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gdDHo-0006Ff-JG for pgsql-performance@arkaria.postgresql.org; Sat, 29 Dec 2018 12:00:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gdDHn-0007eQ-8n for pgsql-performance@arkaria.postgresql.org; Sat, 29 Dec 2018 12:00:11 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gdDHn-0007eJ-11 for pgsql-performance@lists.postgresql.org; Sat, 29 Dec 2018 12:00:11 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gdDHk-0006Yf-4Z for pgsql-performance@postgresql.org; Sat, 29 Dec 2018 12:00:10 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id AD0861118CA11 for ; Sat, 29 Dec 2018 05:00:05 -0700 (MST) Date: Sat, 29 Dec 2018 05:00:05 -0700 (MST) From: Jim Finnerty To: pgsql-performance@postgresql.org Message-ID: <1546084805706-0.post@n3.nabble.com> In-Reply-To: <20181229071535.GX30382@telsasoft.com> References: <20181228153205.GM30382@telsasoft.com> <20181229071535.GX30382@telsasoft.com> Subject: Re: Query Performance Issue 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 Try a pg_hint_plan Rows hint to explore what would happen to the plan if you fixed the bad join cardinality estimate: /*+ rows(prm prc #2028) */ alternatively you could specify a HashJoin hint, but I think it's better to fix the cardinality estimate and then let the optimizer decide what the best plan is. I agree with Justin that it looks like the version and recommended_content_id columns are correlated and that's the likely root cause of the problem, but you don't need to upgrade to fix this one query. ----- Jim Finnerty, AWS, Amazon Aurora PostgreSQL -- Sent from: http://www.postgresql-archive.org/PostgreSQL-performance-f2050081.html