explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0wkq

Settings
# exclusive inclusive rows x rows loops node
1. 36.600 175.328 ↑ 1.0 1 1

Aggregate (cost=22,576.63..22,576.64 rows=1 width=8) (actual time=175.328..175.328 rows=1 loops=1)

2. 10.311 138.728 ↓ 5.8 69,129 1

Gather (cost=1,281.61..22,546.80 rows=11,934 width=16) (actual time=1.602..138.728 rows=69,129 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
3. 10.948 128.417 ↓ 4.9 34,564 2 / 2

Hash Anti Join (cost=281.61..20,353.40 rows=7,020 width=16) (actual time=1.473..128.417 rows=34,564 loops=2)

  • Hash Cond: ((api_rule.id = ah.rule_id) AND (api_host.system_uuid = ah.system_uuid))
4. 27.875 117.434 ↓ 4.9 34,564 2 / 2

Hash Join (cost=274.90..20,239.62 rows=7,020 width=36) (actual time=1.409..117.434 rows=34,564 loops=2)

  • Hash Cond: (api_currentreport.rule_id = api_rule.id)
5. 25.642 88.289 ↓ 9.3 113,064 2 / 2

Nested Loop (cost=0.86..19,849.87 rows=12,144 width=36) (actual time=0.068..88.289 rows=113,064 loops=2)

6. 4.285 4.285 ↓ 2.2 9,727 2 / 2

Parallel Index Only Scan using api_host_account_system_uuid_stale_warn_at_index on api_host (cost=0.43..1,019.93 rows=4,346 width=16) (actual time=0.041..4.285 rows=9,727 loops=2)

  • Index Cond: ((account = '729650'::text) AND (stale_warn_at > '2020-05-16 16:16:47.586377+00'::timestamp with time zone))
  • Heap Fetches: 0
7. 58.362 58.362 ↑ 1.3 12 19,454 / 2

Index Only Scan using curreport_system_uuid_rule_id on api_currentreport (cost=0.43..4.17 rows=16 width=20) (actual time=0.004..0.006 rows=12 loops=19,454)

  • Index Cond: (system_uuid = api_host.system_uuid)
  • Heap Fetches: 0
8. 0.145 1.270 ↑ 1.1 696 2 / 2

Hash (cost=264.81..264.81 rows=738 width=4) (actual time=1.270..1.270 rows=696 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 33kB
9. 0.256 1.125 ↑ 1.1 696 2 / 2

Hash Anti Join (cost=28.18..264.81 rows=738 width=4) (actual time=0.300..1.125 rows=696 loops=2)

  • Hash Cond: (api_rule.id = api_ack.rule_id)
10. 0.589 0.589 ↑ 1.0 1,018 2 / 2

Seq Scan on api_rule (cost=0.00..215.77 rows=1,018 width=4) (actual time=0.012..0.589 rows=1,018 loops=2)

  • Filter: active
  • Rows Removed by Filter: 259
11. 0.076 0.280 ↑ 1.0 351 2 / 2

Hash (cost=23.79..23.79 rows=351 width=4) (actual time=0.280..0.280 rows=351 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
12. 0.204 0.204 ↑ 1.0 351 2 / 2

Seq Scan on api_ack (cost=0.00..23.79 rows=351 width=4) (actual time=0.008..0.204 rows=351 loops=2)

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 752
13. 0.000 0.035 ↓ 0.0 0 2 / 2

Hash (cost=6.69..6.69 rows=2 width=20) (actual time=0.035..0.035 rows=0 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
14. 0.035 0.035 ↓ 0.0 0 2 / 2

Seq Scan on api_hostack ah (cost=0.00..6.69 rows=2 width=20) (actual time=0.035..0.035 rows=0 loops=2)

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 215
Planning time : 1.281 ms
Execution time : 175.554 ms