explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AHMq

Settings
# exclusive inclusive rows x rows loops node
1. 37.476 160.080 ↑ 1.0 1 1

Aggregate (cost=23,203.42..23,203.43 rows=1 width=8) (actual time=160.080..160.080 rows=1 loops=1)

2. 9.739 122.604 ↓ 5.5 67,628 1

Gather (cost=1,275.97..23,172.69 rows=12,292 width=16) (actual time=2.243..122.604 rows=67,628 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
3. 25.466 112.865 ↓ 4.7 33,814 2 / 2

Hash Join (cost=275.97..20,943.49 rows=7,231 width=16) (actual time=1.665..112.865 rows=33,814 loops=2)

  • Hash Cond: (api_currentreport.rule_id = api_rule.id)
4. 23.004 85.869 ↓ 9.0 113,442 2 / 2

Nested Loop (cost=0.86..20,548.96 rows=12,557 width=20) (actual time=0.058..85.869 rows=113,442 loops=2)

5. 4.254 4.254 ↓ 2.2 9,768 2 / 2

Parallel Index Only Scan using api_host_account_system_uuid_stale_warn_at_index on api_host (cost=0.43..1,021.00 rows=4,524 width=16) (actual time=0.034..4.254 rows=9,768 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
6. 58.611 58.611 ↑ 1.3 12 19,537 / 2

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

  • Index Cond: (system_uuid = api_host.system_uuid)
  • Heap Fetches: 0
7. 0.171 1.530 ↑ 1.1 695 2 / 2

Hash (cost=265.88..265.88 rows=739 width=4) (actual time=1.530..1.530 rows=695 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 33kB
8. 0.294 1.359 ↑ 1.1 695 2 / 2

Hash Anti Join (cost=29.25..265.88 rows=739 width=4) (actual time=0.302..1.359 rows=695 loops=2)

  • Hash Cond: (api_rule.id = api_ack.rule_id)
9. 0.787 0.787 ↑ 1.0 1,017 2 / 2

Seq Scan on api_rule (cost=0.00..215.83 rows=1,017 width=4) (actual time=0.014..0.787 rows=1,017 loops=2)

  • Filter: active
  • Rows Removed by Filter: 266
10. 0.070 0.278 ↑ 1.0 351 2 / 2

Hash (cost=24.86..24.86 rows=351 width=4) (actual time=0.278..0.278 rows=351 loops=2)

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

Seq Scan on api_ack (cost=0.00..24.86 rows=351 width=4) (actual time=0.010..0.208 rows=351 loops=2)

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 758
Planning time : 1.160 ms
Execution time : 160.275 ms