Re: Query Performance Issue

From: Jim Finnerty <jfinnert(at)amazon(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Query Performance Issue
Date: 2018-12-29 12:00:05
Message-ID: 1546084805706-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jim Finnerty 2018-12-29 12:17:33 Re: Optimizer choosing the wrong plan
Previous Message Justin Pryzby 2018-12-29 07:15:35 Re: Query Performance Issue