explain.depesz.com

PostgreSQL's explain analyze made readable

Result: X3bf

Settings
# exclusive inclusive rows x rows loops node
1. 31.765 673.607 ↑ 1.0 1 1

Aggregate (cost=54,312.00..54,312.01 rows=1 width=8) (actual time=673.606..673.607 rows=1 loops=1)

2. 49.016 641.842 ↓ 634.2 69,129 1

Nested Loop Anti Join (cost=1,005.30..54,311.73 rows=109 width=16) (actual time=66.470..641.842 rows=69,129 loops=1)

3. 115.777 506.664 ↓ 570.6 86,162 1

Nested Loop (cost=1,005.02..54,262.23 rows=151 width=20) (actual time=66.460..506.664 rows=86,162 loops=1)

4. 0.000 164.759 ↓ 1,190.1 226,128 1

Gather (cost=1,004.75..54,206.15 rows=190 width=20) (actual time=66.438..164.759 rows=226,128 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 16.834 211.714 ↓ 954.1 75,376 3 / 3

Nested Loop (cost=4.75..53,187.15 rows=79 width=20) (actual time=63.589..211.714 rows=75,376 loops=3)

6. 23.184 155.972 ↓ 231.6 6,485 3 / 3

Hash Join (cost=4.31..53,156.62 rows=28 width=16) (actual time=63.532..155.972 rows=6,485 loops=3)

  • Hash Cond: (api_host.account_id = api_account.id)
7. 132.758 132.758 ↑ 1.2 147,293 3 / 3

Parallel Seq Scan on api_host (cost=0.00..52,676.45 rows=181,160 width=20) (actual time=0.147..132.758 rows=147,293 loops=3)

  • Filter: (stale_warn_at > '2020-05-16 16:16:47.586377+00'::timestamp with time zone)
  • Rows Removed by Filter: 421926
8. 0.002 0.030 ↑ 1.0 1 3 / 3

Hash (cost=4.30..4.30 rows=1 width=4) (actual time=0.030..0.030 rows=1 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 0.028 0.028 ↑ 1.0 1 3 / 3

Index Only Scan using api_account_account_id_index on api_account (cost=0.28..4.30 rows=1 width=4) (actual time=0.027..0.028 rows=1 loops=3)

  • Index Cond: (account = '729650'::text)
  • Heap Fetches: 0
10. 38.908 38.908 ↑ 1.3 12 19,454 / 3

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

  • Index Cond: (system_uuid = api_host.system_uuid)
  • Heap Fetches: 0
11. 226.128 226.128 ↓ 0.0 0 226,128

Index Scan using api_rule_pkey on api_rule (cost=0.28..0.30 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=226,128)

  • Index Cond: (id = api_currentreport.rule_id)
  • Filter: active
  • Rows Removed by Filter: 1
12. 86.162 86.162 ↓ 0.0 0 86,162

Index Only Scan using api_ack_rule_id_account_index on api_ack (cost=0.28..0.33 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=86,162)

  • Index Cond: ((rule_id = api_rule.id) AND (account = '729650'::text))
  • Heap Fetches: 0
Planning time : 1.146 ms
Execution time : 673.772 ms