Re: Query Performance Issue - Mailing list pgsql-performance

From Justin Pryzby
Subject Re: Query Performance Issue
Date
Msg-id 20181229071535.GX30382@telsasoft.com
Whole thread Raw
In response to Query Performance Issue  (neslişah demirci <neslisah.demirci@gmail.com>)
Responses Re: Query Performance Issue
Re: Query Performance Issue
List pgsql-performance
On Thu, Dec 27, 2018 at 10:25:47PM +0300, neslişah demirci wrote:
> Have this explain analyze output :
> 
> *https://explain.depesz.com/s/Pra8a <https://explain.depesz.com/s/Pra8a>*

On Sat, Dec 29, 2018 at 07:58:28PM +1300, David Rowley wrote:
> On Sat, 29 Dec 2018 at 04:32, Justin Pryzby <pryzby@telsasoft.com> wrote:
> > I think the solution is to upgrade (at least) to PG10 and CREATE STATISTICS
> > (dependencies).
> 
> Unfortunately, I don't think that'll help this situation. Extended
> statistics are currently only handled for base quals, not join quals.
> See dependency_is_compatible_clause().

Right, understand.

Corrrect me if I'm wrong though, but I think the first major misestimate is in
the scan, not the join:

|Index Scan using product_content_recommendation_main2_recommended_content_id_idx on
product_content_recommendation_main2prm (cost=0.57..2,031.03 rows=345 width=8) (actual time=0.098..68.314 rows=3,347
loops=1)
|Index Cond: (recommended_content_id = 3371132)
|Filter: (version = 1)
|Rows Removed by Filter: 2708

Justin


pgsql-performance by date:

Previous
From: David Rowley
Date:
Subject: Re: Query Performance Issue
Next
From: Jim Finnerty
Date:
Subject: Re: Query Performance Issue