From: | Andreas Kretschmer <andreas(at)a-kretschmer(dot)de> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: FW: Re: Query is running very slow...... |
Date: | 2017-05-26 13:10:34 |
Message-ID: | c8e8c3d7-313f-c89c-c67a-91deaa12d82b@a-kretschmer.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Am 26.05.2017 um 14:31 schrieb Dinesh Chandra 12108:
> Hi Thomas,
>
> Thanks for your reply.
>
> Yes, the query is absolutely same which I posted.
> Please suggest if something need to change in query.
>
> As Per your comment...
> The query you posted includes there two join conditions:
>
> evidence_to_do.project_id = tool_performance.project_id
> evidence_to_do.project_id = project.project_id
>
> But the plan only seems to enforce the equality between 'project' and 'tool_performance'. So when joining the evidence_to_do, it performs a cartesian product, producing ~52B rows (estimated). That can't be fast.
>
>
Dinesh, please check that again. Your colleague Daulat Ram posted a
similar question with this WHERE-Condition:
===
WHERE workflow.project
.project_id = workflow.tool_performance.project_id AND insert_time
>'2017-05-01' AND insert_time <'2017-05-02' AND
workflow.evidence_to_do.status_id in (15100,15150,15200,15300,15400,15500)
===
This condition would explain the query-plan. I have answered that
question yesterday.
Regards, Andreas
--
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin.Hughes@uk.fujitsu.com | 2017-05-26 14:02:40 | Client Server performance & UDS |
Previous Message | Dinesh Chandra 12108 | 2017-05-26 12:31:15 | Re: FW: Re: Query is running very slow...... |