Re: FW: Re: [PERFORM] Query is running very slow......
| От | Andreas Kretschmer |
|---|---|
| Тема | Re: FW: Re: [PERFORM] Query is running very slow...... |
| Дата | |
| Msg-id | c8e8c3d7-313f-c89c-c67a-91deaa12d82b@a-kretschmer.de обсуждение исходный текст |
| Ответ на | Re: FW: Re: [PERFORM] Query is running very slow...... (Dinesh Chandra 12108 <Dinesh.Chandra@cyient.com>) |
| Список | 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
В списке pgsql-performance по дате отправления: