explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KOJd

Settings
# exclusive inclusive rows x rows loops node
1. 108.096 389.325 ↑ 1.0 1 1

Aggregate (cost=113,613.41..113,613.42 rows=1 width=72) (actual time=389.325..389.325 rows=1 loops=1)

2. 23.972 281.229 ↑ 1.3 69,058 1

Hash Join (cost=13,151.27..109,867.63 rows=88,136 width=29) (actual time=51.188..281.229 rows=69,058 loops=1)

  • Hash Cond: (api_rule.category_id = api_rulecategory.id)
3. 48.566 257.251 ↑ 1.3 69,058 1

Hash Join (cost=13,150.18..109,390.06 rows=88,136 width=22) (actual time=51.179..257.251 rows=69,058 loops=1)

  • Hash Cond: (api_currentreport.rule_id = api_rule.id)
4. 161.113 199.667 ↓ 1.0 226,529 1

Bitmap Heap Scan on api_currentreport (cost=12,901.38..108,555.90 rows=222,255 width=20) (actual time=42.146..199.667 rows=226,529 loops=1)

  • Recheck Cond: ((account)::text = '729650'::text)
  • Filter: (stale > '2020-05-14 23:57:51.031771+00'::timestamp with time zone)
  • Rows Removed by Filter: 2200
  • Heap Blocks: exact=20980
5. 38.554 38.554 ↓ 1.0 228,729 1

Bitmap Index Scan on api_currentreport_account_rule_id_system_uuid_f48d4524_uniq (cost=0.00..12,845.82 rows=227,368 width=0) (actual time=38.554..38.554 rows=228,729 loops=1)

  • Index Cond: ((account)::text = '729650'::text)
6. 0.127 9.018 ↓ 1.4 690 1

Hash (cost=242.48..242.48 rows=506 width=10) (actual time=9.018..9.018 rows=690 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 38kB
7. 8.737 8.891 ↓ 1.4 690 1

Seq Scan on api_rule (cost=24.53..242.48 rows=506 width=10) (actual time=0.238..8.891 rows=690 loops=1)

  • Filter: (active AND (NOT (hashed SubPlan 1)))
  • Rows Removed by Filter: 586
8.          

SubPlan (for Seq Scan)

9. 0.154 0.154 ↑ 1.0 351 1

Seq Scan on api_ack u2 (cost=0.00..23.65 rows=351 width=4) (actual time=0.007..0.154 rows=351 loops=1)

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 741
10. 0.002 0.006 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=15) (actual time=0.006..0.006 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 0.004 0.004 ↑ 1.0 4 1

Seq Scan on api_rulecategory (cost=0.00..1.04 rows=4 width=15) (actual time=0.003..0.004 rows=4 loops=1)

Planning time : 0.467 ms
Execution time : 389.399 ms