explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hkLE

Settings
# exclusive inclusive rows x rows loops node
1. 38.914 150.540 ↑ 1.0 1 1

Aggregate (cost=23,781.18..23,781.19 rows=1 width=8) (actual time=150.540..150.540 rows=1 loops=1)

2. 2.979 111.626 ↓ 5.7 69,196 1

Gather (cost=1,289.63..23,750.91 rows=12,109 width=16) (actual time=1.610..111.626 rows=69,196 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 6.401 108.647 ↓ 4.6 23,065 3 / 3

Hash Anti Join (cost=289.63..21,540.01 rows=5,045 width=16) (actual time=1.332..108.647 rows=23,065 loops=3)

  • Hash Cond: ((api_rule.id = ah.rule_id) AND (api_currentreport.system_uuid = ah.system_uuid))
4. 19.350 102.200 ↓ 4.6 23,065 3 / 3

Hash Join (cost=282.91..21,456.36 rows=5,045 width=20) (actual time=1.257..102.200 rows=23,065 loops=3)

  • Hash Cond: (api_currentreport.rule_id = api_rule.id)
5. 19.314 81.688 ↓ 8.6 75,444 3 / 3

Nested Loop (cost=0.98..21,091.26 rows=8,728 width=20) (actual time=0.038..81.688 rows=75,444 loops=3)

6. 3.940 3.940 ↓ 2.1 6,493 3 / 3

Parallel Index Only Scan using api_host_account_system_uuid_stale_warn_at_index on api_host (cost=0.43..1,274.99 rows=3,114 width=16) (actual time=0.020..3.940 rows=6,493 loops=3)

  • Index Cond: ((account = '729650'::text) AND (stale_warn_at > '2020-05-16 16:16:47.586377+00'::timestamp with time zone))
  • Heap Fetches: 521
7. 58.434 58.434 ↑ 6.2 12 19,478 / 3

Index Only Scan using curreport_system_uuid_rule_id on api_currentreport (cost=0.56..5.61 rows=75 width=20) (actual time=0.006..0.009 rows=12 loops=19,478)

  • Index Cond: (system_uuid = api_host.system_uuid)
  • Heap Fetches: 1775
8. 0.128 1.162 ↑ 1.1 696 3 / 3

Hash (cost=272.70..272.70 rows=738 width=4) (actual time=1.162..1.162 rows=696 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 33kB
9. 0.219 1.034 ↑ 1.1 696 3 / 3

Hash Anti Join (cost=28.06..272.70 rows=738 width=4) (actual time=0.278..1.034 rows=696 loops=3)

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

Seq Scan on api_rule (cost=0.00..223.77 rows=1,018 width=4) (actual time=0.009..0.557 rows=1,018 loops=3)

  • Filter: active
  • Rows Removed by Filter: 259
11. 0.063 0.258 ↑ 1.0 351 3 / 3

Hash (cost=23.68..23.68 rows=351 width=4) (actual time=0.258..0.258 rows=351 loops=3)

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

Seq Scan on api_ack (cost=0.00..23.68 rows=351 width=4) (actual time=0.007..0.195 rows=351 loops=3)

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

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

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

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

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