explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HLF0

Settings
# exclusive inclusive rows x rows loops node
1. 106.040 241.502 ↑ 1.0 1 1

Aggregate (cost=16,190.66..16,190.67 rows=1 width=72) (actual time=241.501..241.502 rows=1 loops=1)

2. 22.489 135.462 ↑ 1.3 69,058 1

Hash Join (cost=250.45..12,377.09 rows=89,731 width=29) (actual time=1.557..135.462 rows=69,058 loops=1)

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

Hash Join (cost=249.36..11,890.89 rows=89,731 width=22) (actual time=1.543..112.964 rows=69,058 loops=1)

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

Index Only Scan using api_currentreport_account_stale_system_uuid_rule_id_index on api_currentreport (cost=0.56..11,046.14 rows=226,279 width=20) (actual time=0.035..66.324 rows=226,529 loops=1)

  • Index Cond: ((account = '729650'::text) AND (stale > '2020-05-14 23:57:51.031771+00'::timestamp with time zone))
  • Heap Fetches: 0
5. 0.193 1.500 ↓ 1.4 690 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 38kB
6. 1.076 1.307 ↓ 1.4 690 1

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

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

SubPlan (for Seq Scan)

8. 0.231 0.231 ↑ 1.0 351 1

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

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 741
9. 0.003 0.009 ↑ 1.0 4 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.006 0.006 ↑ 1.0 4 1

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

Planning time : 0.779 ms
Execution time : 241.614 ms