explain.depesz.com

PostgreSQL's explain analyze made readable

Result: G9WB

Settings
# exclusive inclusive rows x rows loops node
1. 522.124 5,849.168 ↑ 1.0 411,246 1

Unique (cost=684,327.59..722,382.59 rows=414,335 width=318) (actual time=5,050.782..5,849.168 rows=411,246 loops=1)

2. 2,651.086 5,327.044 ↓ 1.0 1,020,663 1

Sort (cost=684,327.59..686,864.59 rows=1,014,800 width=318) (actual time=5,050.781..5,327.044 rows=1,020,663 loops=1)

  • Sort 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
  • Sort Method: external merge Disk: 361,760kB
3. 258.146 2,675.958 ↓ 1.0 1,020,663 1

Hash Join (cost=33,816.55..495,728.56 rows=1,014,800 width=318) (actual time=429.474..2,675.958 rows=1,020,663 loops=1)

  • Hash Cond: (i.hostid = h.hostid)
4. 505.297 2,409.882 ↑ 1.0 1,021,453 1

Hash Join (cost=33,031.26..480,958.89 rows=1,023,038 width=326) (actual time=401.976..2,409.882 rows=1,021,453 loops=1)

  • Hash Cond: (f.itemid = i.itemid)
5. 312.375 1,505.932 ↑ 1.0 1,021,453 1

Merge Join (cost=899.85..434,760.70 rows=1,023,038 width=326) (actual time=0.043..1,505.932 rows=1,021,453 loops=1)

  • Merge Cond: (t.triggerid = f.triggerid)
6. 857.519 857.519 ↑ 1.0 411,910 1

Index Scan using triggers_pkey on triggers t (cost=0.42..392,714.27 rows=414,335 width=318) (actual time=0.032..857.519 rows=411,910 loops=1)

  • Filter: (flags <> 2)
  • Rows Removed by Filter: 30,731
7. 336.038 336.038 ↓ 1.0 1,095,396 1

Index Scan using functions_1 on functions f (cost=0.43..28,355.96 rows=1,095,141 width=16) (actual time=0.008..336.038 rows=1,095,396 loops=1)

8. 201.444 398.653 ↓ 1.0 896,270 1

Hash (cost=21,110.41..21,110.41 rows=881,680 width=16) (actual time=398.653..398.653 rows=896,270 loops=1)

  • Buckets: 1,048,576 Batches: 1 Memory Usage: 50,205kB
9. 197.209 197.209 ↓ 1.0 896,270 1

Index Only Scan using items_9 on items i (cost=0.42..21,110.41 rows=881,680 width=16) (actual time=0.038..197.209 rows=896,270 loops=1)

  • Heap Fetches: 59,572
10. 2.093 7.930 ↑ 1.0 13,303 1

Hash (cost=619.00..619.00 rows=13,303 width=8) (actual time=7.930..7.930 rows=13,303 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 648kB
11. 5.837 5.837 ↑ 1.0 13,303 1

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

  • Filter: (status = ANY ('{0,1}'::integer[]))
  • Rows Removed by Filter: 108
  • Heap Fetches: 2,152
Planning time : 3.927 ms
Execution time : 5,939.059 ms