explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NP3R : Optimization for: plan #6pZU

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 3.262 45.656 ↑ 1.8 26 1

GroupAggregate (cost=2,260.64..2,261.68 rows=46 width=32) (actual time=41.453..45.656 rows=26 loops=1)

  • Group Key: a.object_id
2. 5.086 42.394 ↓ 260.4 11,978 1

Sort (cost=2,260.64..2,260.76 rows=46 width=6) (actual time=41.425..42.394 rows=11,978 loops=1)

  • Sort Key: a.object_id
  • Sort Method: quicksort Memory: 946kB
3. 6.515 37.308 ↓ 260.4 11,978 1

Nested Loop (cost=0.56..2,259.37 rows=46 width=6) (actual time=1.834..37.308 rows=11,978 loops=1)

4. 7.189 7.189 ↓ 1.2 42 1

Seq Scan on hub_auto_messages b (cost=0.00..1,848.90 rows=36 width=4) (actual time=0.153..7.189 rows=42 loops=1)

  • Filter: ((hub_id = 92) OR is_default)
  • Rows Removed by Filter: 4,384
5. 23.604 23.604 ↓ 142.5 285 42

Index Scan using email_history_object_type_id_hub_idx on email_history a (cost=0.56..11.38 rows=2 width=6) (actual time=0.027..0.562 rows=285 loops=42)

  • Index Cond: ((object_type = 'HubAutoMessage'::text) AND (object_id = b.id) AND (hub_id = 92))
Planning time : 1.884 ms
Execution time : 45.865 ms