explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jblp

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

Update on epics (cost=10,944.85..11,452.02 rows=6 width=869) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10,944.85..11,452.02 rows=6 width=869) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Subquery Scan on ANY_subquery (cost=10,944.57..10,944.66 rows=6 width=32) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Limit (cost=10,944.57..10,944.60 rows=6 width=4) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Unique (cost=10,944.57..10,944.60 rows=6 width=4) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Sort (cost=10,944.57..10,944.58 rows=6 width=4) (actual rows= loops=)

  • Sort Key: epics_1.id
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10,940.44..10,944.49 rows=6 width=4) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

HashAggregate (cost=10,940.15..10,940.24 rows=9 width=8) (actual rows= loops=)

  • Group Key: epics_2.id
9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10,029.64..10,940.13 rows=9 width=8) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Hash Join (cost=10,029.36..10,937.29 rows=9 width=4) (actual rows= loops=)

  • Hash Cond: (epic_issues.issue_id = issues.id)
11. 0.000 0.000 ↓ 0.0

Seq Scan on epic_issues (cost=0.00..819.52 rows=23,552 width=8) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash (cost=9,943.87..9,943.87 rows=6,839 width=4) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Index Scan using index_issues_on_milestone_id on issues (cost=0.56..9,943.87 rows=6,839 width=4) (actual rows= loops=)

  • Index Cond: (milestone_id = 490705)
14. 0.000 0.000 ↓ 0.0

Index Only Scan using epics_pkey on epics epics_2 (cost=0.29..0.31 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = epic_issues.epic_id)
15. 0.000 0.000 ↓ 0.0

Index Scan using epics_pkey on epics epics_1 (cost=0.29..0.46 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = epic_issues.epic_id)
  • Filter: (((NOT start_date_is_fixed) OR (start_date_is_fixed IS NULL)) AND ((NOT due_date_is_fixed) OR (due_date_is_fixed IS NULL)) AND (state = 1))
16. 0.000 0.000 ↓ 0.0

Index Scan using epics_pkey on epics (cost=0.29..4.30 rows=1 width=753) (actual rows= loops=)

  • Index Cond: (id = "ANY_subquery".id)
17.          

SubPlan (forNested Loop)

18. 0.000 0.000 ↓ 0.0

Limit (cost=40.10..40.10 rows=1 width=12) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Sort (cost=40.10..40.11 rows=3 width=12) (actual rows= loops=)

  • Sort Key: min_date.min_start_date
20. 0.000 0.000 ↓ 0.0

Subquery Scan on min_date (cost=40.02..40.08 rows=3 width=12) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

HashAggregate (cost=40.02..40.05 rows=3 width=16) (actual rows= loops=)

  • Group Key: epic_issues_1.epic_id, milestones.start_date, (NULL::integer), milestones.id
22. 0.000 0.000 ↓ 0.0

Append (cost=1.15..39.99 rows=3 width=16) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.15..31.81 rows=2 width=16) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.72..29.53 rows=5 width=8) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Index Scan using index_epic_issues_on_epic_id on epic_issues epic_issues_1 (cost=0.29..7.21 rows=5 width=8) (actual rows= loops=)

  • Index Cond: (epic_id = epics.id)
26. 0.000 0.000 ↓ 0.0

Index Scan using issues_pkey on issues issues_1 (cost=0.44..4.46 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = epic_issues_1.issue_id)
27. 0.000 0.000 ↓ 0.0

Index Scan using milestones_pkey on milestones (cost=0.42..0.44 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = issues_1.milestone_id)
  • Filter: (start_date IS NOT NULL)
28. 0.000 0.000 ↓ 0.0

Index Scan using index_epics_on_parent_id on epics epic_dates (cost=0.29..8.16 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (parent_id = epics.id)
  • Filter: (start_date IS NOT NULL)
29. 0.000 0.000 ↓ 0.0

Limit (cost=40.14..40.15 rows=1 width=12) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Sort (cost=40.14..40.15 rows=4 width=12) (actual rows= loops=)

  • Sort Key: max_date.max_end_date DESC
31. 0.000 0.000 ↓ 0.0

Subquery Scan on max_date (cost=40.04..40.12 rows=4 width=12) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

HashAggregate (cost=40.04..40.08 rows=4 width=16) (actual rows= loops=)

  • Group Key: epic_issues_2.epic_id, milestones_1.due_date, (NULL::integer), milestones_1.id
33. 0.000 0.000 ↓ 0.0

Append (cost=1.15..40.00 rows=4 width=16) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.15..31.81 rows=3 width=16) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.72..29.53 rows=5 width=8) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Index Scan using index_epic_issues_on_epic_id on epic_issues epic_issues_2 (cost=0.29..7.21 rows=5 width=8) (actual rows= loops=)

  • Index Cond: (epic_id = epics.id)
37. 0.000 0.000 ↓ 0.0

Index Scan using issues_pkey on issues issues_2 (cost=0.44..4.46 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = epic_issues_2.issue_id)
38. 0.000 0.000 ↓ 0.0

Index Scan using milestones_pkey on milestones milestones_1 (cost=0.42..0.44 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = issues_2.milestone_id)
  • Filter: (due_date IS NOT NULL)
39. 0.000 0.000 ↓ 0.0

Index Scan using index_epics_on_parent_id on epics epic_dates_1 (cost=0.29..8.16 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (parent_id = epics.id)
  • Filter: (end_date IS NOT NULL)