explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gD1h

Settings
# exclusive inclusive rows x rows loops node
1. 27.572 136.705 ↑ 1.0 1 1

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

2. 16.683 109.133 ↓ 5.7 69,181 1

Gather (cost=1,282.91..23,667.26 rows=12,109 width=16) (actual time=1.514..109.133 rows=69,181 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 15.992 92.450 ↓ 4.6 23,060 3 / 3

Hash Join (cost=282.91..21,456.36 rows=5,045 width=16) (actual time=1.269..92.450 rows=23,060 loops=3)

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

Nested Loop (cost=0.98..21,091.26 rows=8,728 width=20) (actual time=0.040..75.280 rows=75,429 loops=3)

5. 3.117 3.117 ↓ 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.021..3.117 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: 22
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: 69
7. 0.138 1.178 ↑ 1.1 696 3 / 3

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

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

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

  • Hash Cond: (api_rule.id = api_ack.rule_id)
9. 0.571 0.571 ↑ 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.571 rows=1,018 loops=3)

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

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

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

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

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