explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7j3m

Settings
# exclusive inclusive rows x rows loops node
1. 9.892 124.535 ↑ 1.0 1 1

Aggregate (cost=23,697.53..23,697.54 rows=1 width=8) (actual time=124.535..124.535 rows=1 loops=1)

2. 17.059 114.643 ↓ 5.7 69,181 1

Gather (cost=1,282.91..23,667.26 rows=12,109 width=4) (actual time=1.494..114.643 rows=69,181 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 20.022 97.584 ↓ 4.6 23,060 3 / 3

Hash Join (cost=282.91..21,456.36 rows=5,045 width=4) (actual time=1.258..97.584 rows=23,060 loops=3)

  • Hash Cond: (api_currentreport.rule_id = api_rule.id)
4. 21.347 76.391 ↓ 8.6 75,429 3 / 3

Nested Loop (cost=0.98..21,091.26 rows=8,728 width=4) (actual time=0.037..76.391 rows=75,429 loops=3)

5. 3.116 3.116 ↓ 2.1 6,491 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.116 rows=6,491 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: 14
6. 51.928 51.928 ↑ 6.2 12 19,473 / 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.005..0.008 rows=12 loops=19,473)

  • Index Cond: (system_uuid = api_host.system_uuid)
  • Heap Fetches: 81
7. 0.137 1.171 ↑ 1.1 696 3 / 3

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

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

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

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

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

  • Filter: active
  • Rows Removed by Filter: 259
10. 0.066 0.255 ↑ 1.0 351 3 / 3

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

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

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

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 752
Planning time : 0.591 ms
Execution time : 124.644 ms