explain.depesz.com

PostgreSQL's explain analyze made readable

Result: T59q

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

Update on issues (cost=44,202.87..44,354.92 rows=34 width=838) (actual rows= loops=)

2.          

CTE promotion_notes

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,229.61..40,723.53 rows=849 width=116) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on notes (cost=1,229.17..36,946.87 rows=849 width=116) (actual rows= loops=)

  • Recheck Cond: (note ~~ 'promoted to epic%'::text)
  • Filter: (system AND (id >= 123,972,803) AND (id <= 168,890,563) AND ((noteable_type)::text = 'Issue'::text))
5. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_notes_on_note_trigram (cost=0.00..1,228.96 rows=17,195 width=0) (actual rows= loops=)

  • Index Cond: (note ~~ 'promoted to epic%'::text)
6. 0.000 0.000 ↓ 0.0

Index Scan using projects_pkey on projects (cost=0.43..4.44 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = notes.project_id)
7.          

CTE promoted_epics

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..3,478.90 rows=34 width=8) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

CTE Scan on promotion_notes (cost=0.00..16.98 rows=849 width=40) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Index Scan using index_epics_on_group_id on epics (cost=0.29..4.07 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (group_id = promotion_notes.epic_group_id)
  • Filter: (promotion_notes.promotion_note = concat('promoted to epic &', iid))
11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.44..152.49 rows=34 width=838) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

CTE Scan on promoted_epics (cost=0.00..0.68 rows=34 width=40) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (id = promoted_epics.issue_id)
  • Filter: (promoted_to_epic_id IS NULL)