Re: Query Performance Issue - Mailing list pgsql-performance

From Jim Finnerty
Subject Re: Query Performance Issue
Date
Msg-id 1546084805706-0.post@n3.nabble.com
Whole thread Raw
In response to Re: Query Performance Issue  (Justin Pryzby <pryzby@telsasoft.com>)
List 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


pgsql-performance by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: Query Performance Issue
Next
From: Jim Finnerty
Date:
Subject: Re: Optimizer choosing the wrong plan