explain.depesz.com

PostgreSQL's explain analyze made readable

Result: teYw

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

Update on notes (cost=324,596.40..324,606.51 rows=1 width=2,502) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=324,596.40..324,606.51 rows=1 width=2,502) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

HashAggregate (cost=324,595.70..324,595.71 rows=1 width=106) (actual rows= loops=)

  • Group Key: ("ANY_subquery".discussion_id)::text
4. 0.000 0.000 ↓ 0.0

Subquery Scan on ANY_subquery (cost=324,595.68..324,595.70 rows=1 width=106) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Limit (cost=324,595.68..324,595.69 rows=1 width=41) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Unique (cost=324,595.68..324,595.69 rows=1 width=41) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Sort (cost=324,595.68..324,595.69 rows=1 width=41) (actual rows= loops=)

  • Sort Key: notes_1.discussion_id
8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=324,250.12..324,595.67 rows=1 width=41) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Unique (cost=324,249.55..324,249.92 rows=75 width=4) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Sort (cost=324,249.55..324,249.74 rows=75 width=4) (actual rows= loops=)

  • Sort Key: notes_2.noteable_id
11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.14..324,247.21 rows=75 width=4) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Index Scan using index_notes_on_noteable_type on notes notes_2 (cost=0.57..101,729.22 rows=50,805 width=8) (actual rows= loops=)

  • Index Cond: ((noteable_type)::text = 'Epic'::text)
  • Filter: system
13. 0.000 0.000 ↓ 0.0

Index Scan using index_system_note_metadata_on_note_id on system_note_metadata (cost=0.57..4.37 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (note_id = notes_2.id)
  • Filter: ((action)::text = 'moved'::text)
14. 0.000 0.000 ↓ 0.0

Index Scan using index_notes_on_noteable_id_and_noteable_type on notes notes_1 (cost=0.57..4.59 rows=1 width=45) (actual rows= loops=)

  • Index Cond: ((noteable_id = notes_2.noteable_id) AND ((noteable_type)::text = 'Epic'::text))
15. 0.000 0.000 ↓ 0.0

Index Scan using index_notes_on_discussion_id on notes (cost=0.70..10.77 rows=1 width=2,442) (actual rows= loops=)

  • Index Cond: ((discussion_id)::text = ("ANY_subquery".discussion_id)::text)
  • Filter: ((noteable_type)::text = 'Epic'::text)