explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iWen

Settings
# exclusive inclusive rows x rows loops node
1. 90.507 1,118.131 ↓ 5.1 58,363 1

Nested Loop (cost=63,641.08..146,491.28 rows=11,454 width=67) (actual time=391.295..1,118.131 rows=58,363 loops=1)

2. 59.949 471.760 ↓ 1.4 46,322 1

Hash Join (cost=63,640.65..65,005.89 rows=32,802 width=18) (actual time=391.259..471.760 rows=46,322 loops=1)

  • Hash Cond: (sv.visit_id = v.id)
3. 21.130 21.130 ↓ 1.0 46,642 1

Seq Scan on signed_visits sv (cost=0.00..862.34 rows=46,634 width=9) (actual time=0.007..21.130 rows=46,642 loops=1)

4. 162.569 390.681 ↓ 1.0 274,828 1

Hash (cost=60,214.22..60,214.22 rows=274,114 width=18) (actual time=390.681..390.681 rows=274,828 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 17516kB
5. 228.112 228.112 ↓ 1.0 274,828 1

Seq Scan on visits v (cost=0.00..60,214.22 rows=274,114 width=18) (actual time=0.006..228.112 rows=274,828 loops=1)

  • Filter: (status = 'closed'::store.visit_status_enum)
  • Rows Removed by Filter: 115242
6. 555.864 555.864 ↑ 1.0 1 46,322

Index Scan using messages_user_id_idx on messages m (cost=0.43..2.47 rows=1 width=26) (actual time=0.009..0.012 rows=1 loops=46,322)

  • Index Cond: (user_id = v.user_id)
  • Filter: (is_reply AND (NOT read))
  • Rows Removed by Filter: 4