explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UQxb : Optimization Serveur de recette (APG03)

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Merge Join (cost=127,242,972.36..130,544,114.83 rows=165,989,509 width=990) (actual rows= loops=)

  • Merge Cond: (((rapports.idrapport)::text = (detailrapports.idrapport)::text) AND (rapports.version = detailrapports.version))
2. 0.000 0.000 ↓ 0.0

Sort (cost=30,982,634.52..30,987,891.93 rows=2,102,965 width=660) (actual rows= loops=)

  • Sort Key: rapports.idrapport, rapports.version
3. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=29,039,039.14..29,532,651.20 rows=2,102,965 width=660) (actual rows= loops=)

  • Hash Cond: ((rapports.nintervention)::text = (interventions.idintervention)::text)
4. 0.000 0.000 ↓ 0.0

Seq Scan on rapports (cost=0.00..89,790.65 rows=2,102,965 width=660) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash (cost=29,028,676.94..29,028,676.94 rows=613,296 width=12) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Seq Scan on interventions (cost=0.00..29,028,676.94 rows=613,296 width=12) (actual rows= loops=)

  • Filter: (alternatives: SubPlan 1 or hashed SubPlan 2)
7.          

SubPlan (for Seq Scan)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4.28..23.61 rows=1 width=0) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on compteworkflowclient (cost=4.28..15.32 rows=1 width=4) (actual rows= loops=)

  • Recheck Cond: (idcompte = 103865)
  • Filter: ((wkfactif IS TRUE) AND ($0 = (idcompte)::numeric))
10. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on compteworkflowclient_pkey (cost=0.00..4.28 rows=3 width=0) (actual rows= loops=)

  • Index Cond: (idcompte = 103865)
11. 0.000 0.000 ↓ 0.0

Index Scan using workflow_pkey on workflowclient (cost=0.00..8.27 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (administration.workflowclient.id = administration.compteworkflowclient.idworkflowclient)
  • Filter: (administration.workflowclient.idapplication = 1::numeric)
12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4.28..23.60 rows=1 width=4) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on compteworkflowclient (cost=4.28..15.31 rows=1 width=8) (actual rows= loops=)

  • Recheck Cond: (idcompte = 103865)
  • Filter: (wkfactif IS TRUE)
14. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on compteworkflowclient_pkey (cost=0.00..4.28 rows=3 width=0) (actual rows= loops=)

  • Index Cond: (idcompte = 103865)
15. 0.000 0.000 ↓ 0.0

Index Scan using workflow_pkey on workflowclient (cost=0.00..8.27 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (administration.workflowclient.id = administration.compteworkflowclient.idworkflowclient)
  • Filter: (administration.workflowclient.idapplication = 1::numeric)
16. 0.000 0.000 ↓ 0.0

Materialize (cost=96,260,310.79..97,021,579.11 rows=152,253,664 width=330) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Sort (cost=96,260,310.79..96,640,944.95 rows=152,253,664 width=330) (actual rows= loops=)

  • Sort Key: detailrapports.idrapport, detailrapports.version
18. 0.000 0.000 ↓ 0.0

Seq Scan on detailrapports (cost=0.00..6,094,413.64 rows=152,253,664 width=330) (actual rows= loops=)