explain.depesz.com

PostgreSQL's explain analyze made readable

Result: k7Uf

Settings

Optimization(s) for this plan:

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

Nested Loop (cost=4,884,999.26..4,885,005.15 rows=1 width=4) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4,884,998.98..4,885,003.02 rows=1 width=8) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

HashAggregate (cost=4,884,998.41..4,884,998.42 rows=1 width=4) (actual rows= loops=)

  • Group Key: notes_1.id
4. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=4,884,940.33..4,884,998.40 rows=1 width=4) (actual rows= loops=)

  • Merge Cond: (notes_1.id = epic_user_mentions.note_id)
  • Filter: (epic_user_mentions.epic_id IS NULL)
5. 0.000 0.000 ↓ 0.0

Sort (cost=4,884,922.60..4,884,951.21 rows=11,441 width=4) (actual rows= loops=)

  • Sort Key: notes_1.id
6. 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,884,151.37 rows=11,441 width=4) (actual rows= loops=)

  • Index Cond: ((noteable_type)::text = 'Epic'::text)
  • Filter: ((note ~~ '%@%'::text) AND (id >= 67972855) AND (id < 268738059))
7. 0.000 0.000 ↓ 0.0

Sort (cost=17.73..18.35 rows=248 width=8) (actual rows= loops=)

  • Sort Key: epic_user_mentions.note_id
8. 0.000 0.000 ↓ 0.0

Index Only Scan using epic_user_mentions_on_epic_id_and_note_id_index on epic_user_mentions (cost=0.14..7.87 rows=248 width=8) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Index Scan using notes_pkey on notes (cost=0.57..4.59 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = notes_1.id)
10. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (id = notes.noteable_id)