explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cmly

Settings
# exclusive inclusive rows x rows loops node
1. 28.399 537.833 ↑ 1.0 1 1

Aggregate (cost=176.27..176.28 rows=1 width=8) (actual time=537.833..537.833 rows=1 loops=1)

2. 19.660 509.434 ↓ 634.2 69,129 1

Hash Anti Join (cost=24.23..176.00 rows=109 width=16) (actual time=0.168..509.434 rows=69,129 loops=1)

  • Hash Cond: (api_rule.id = api_ack.rule_id)
3. 118.599 489.645 ↓ 570.6 86,162 1

Nested Loop (cost=1.42..150.08 rows=151 width=20) (actual time=0.035..489.645 rows=86,162 loops=1)

4. 38.532 144.918 ↓ 1,190.1 226,128 1

Nested Loop (cost=1.14..94.00 rows=190 width=20) (actual time=0.027..144.918 rows=226,128 loops=1)

5. 2.939 9.116 ↓ 286.1 19,454 1

Nested Loop (cost=0.71..19.87 rows=68 width=16) (actual time=0.022..9.116 rows=19,454 loops=1)

6. 0.010 0.010 ↑ 1.0 1 1

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

  • Index Cond: (account = '729650'::text)
  • Heap Fetches: 0
7. 6.167 6.167 ↓ 81.7 19,454 1

Index Only Scan using api_host_account_id_stale_warn_at_system_uuid_index on api_host (cost=0.43..13.19 rows=238 width=20) (actual time=0.011..6.167 rows=19,454 loops=1)

  • Index Cond: ((account_id = api_account.id) AND (stale_warn_at > '2020-05-16 16:16:47.586377+00'::timestamp with time zone))
  • Heap Fetches: 0
8. 97.270 97.270 ↑ 1.3 12 19,454

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.003..0.005 rows=12 loops=19,454)

  • Index Cond: (system_uuid = api_host.system_uuid)
  • Heap Fetches: 0
9. 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
10. 0.056 0.129 ↑ 1.0 351 1

Hash (cost=18.42..18.42 rows=351 width=4) (actual time=0.129..0.129 rows=351 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
11. 0.073 0.073 ↑ 1.0 351 1

Index Only Scan using api_ack_account_rule_id_index on api_ack (cost=0.28..18.42 rows=351 width=4) (actual time=0.013..0.073 rows=351 loops=1)

  • Index Cond: (account = '729650'::text)
  • Heap Fetches: 0
Planning time : 1.276 ms
Execution time : 537.881 ms