explain.depesz.com

PostgreSQL's explain analyze made readable

Result: L5xj

Settings
# exclusive inclusive rows x rows loops node
1. 1,584.069 3,526.883 ↓ 1.0 411,458 1

HashAggregate (cost=524,625.79..528,660.82 rows=403,503 width=318) (actual time=3,234.750..3,526.883 rows=411,458 loops=1)

  • Group Key: t.triggerid, t.description, t.expression, t.error, t.priority, t.type, t.value, t.state, t.lastchange, t.status, t.recovery_mode, t.recovery_expression, t.correlation_mode, t.correlation_tag
2. 442.272 1,942.814 ↓ 1.0 1,021,287 1

Hash Join (cost=45,370.03..489,295.43 rows=1,009,439 width=318) (actual time=486.264..1,942.814 rows=1,021,287 loops=1)

  • Hash Cond: (f.itemid = i.itemid)
3. 256.447 1,031.266 ↓ 1.0 1,022,077 1

Merge Join (cost=957.01..430,971.90 rows=1,017,634 width=326) (actual time=0.032..1,031.266 rows=1,022,077 loops=1)

  • Merge Cond: (t.triggerid = f.triggerid)
4. 522.840 522.840 ↓ 1.0 412,122 1

Index Scan using triggers_pkey on triggers t (cost=0.42..388,703.41 rows=403,503 width=318) (actual time=0.020..522.840 rows=412,122 loops=1)

  • Filter: (flags <> 2)
  • Rows Removed by Filter: 30,731
5. 251.979 251.979 ↓ 1.0 1,096,020 1

Index Scan using functions_1 on functions f (cost=0.43..28,363.75 rows=1,095,544 width=16) (actual time=0.008..251.979 rows=1,096,020 loops=1)

6. 199.801 469.276 ↓ 1.0 894,482 1

Hash (cost=33,247.05..33,247.05 rows=893,277 width=8) (actual time=469.275..469.276 rows=894,482 loops=1)

  • Buckets: 1,048,576 Batches: 1 Memory Usage: 43,133kB
7. 111.987 269.475 ↓ 1.0 894,482 1

Merge Join (cost=1.82..33,247.05 rows=893,277 width=8) (actual time=0.453..269.475 rows=894,482 loops=1)

  • Merge Cond: (h.hostid = i.hostid)
8. 3.880 3.880 ↑ 1.0 13,303 1

Index Only Scan using hosts_6 on hosts h (cost=0.41..620.15 rows=13,303 width=8) (actual time=0.014..3.880 rows=13,303 loops=1)

  • Filter: (status = ANY ('{0,1}'::integer[]))
  • Rows Removed by Filter: 108
  • Heap Fetches: 1,817
9. 153.608 153.608 ↑ 1.0 896,741 1

Index Only Scan using items_9 on items i (cost=0.42..21,409.65 rows=900,529 width=16) (actual time=0.011..153.608 rows=896,741 loops=1)

  • Heap Fetches: 57,559
Planning time : 0.659 ms
Execution time : 3,545.032 ms