explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NQTs

Settings
# exclusive inclusive rows x rows loops node
1. 103.893 234.999 ↑ 1.0 1 1

Aggregate (cost=16,247.05..16,247.06 rows=1 width=72) (actual time=234.999..234.999 rows=1 loops=1)

2. 21.894 131.106 ↑ 1.3 69,058 1

Hash Join (cost=250.45..12,418.73 rows=90,078 width=29) (actual time=1.084..131.106 rows=69,058 loops=1)

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

Hash Join (cost=249.36..11,930.65 rows=90,078 width=22) (actual time=1.072..109.204 rows=69,058 loops=1)

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

Index Only Scan using a2 on api_currentreport (cost=0.56..11,083.60 rows=227,152 width=20) (actual time=0.028..63.966 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.136 1.039 ↓ 1.4 690 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 38kB
6. 0.757 0.903 ↓ 1.4 690 1

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

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

SubPlan (for Seq Scan)

8. 0.146 0.146 ↑ 1.0 351 1

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

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

Hash (cost=1.04..1.04 rows=4 width=15) (actual time=0.008..0.008 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.004..0.006 rows=4 loops=1)

Planning time : 0.931 ms
Execution time : 235.077 ms