explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KcBF

Settings
# exclusive inclusive rows x rows loops node
1. 58.712 89,179.980 ↑ 1.0 1 1

Aggregate (cost=10,254,984.83..10,254,984.84 rows=1 width=8) (actual time=89,179.980..89,179.980 rows=1 loops=1)

2. 4,246.684 89,121.268 ↑ 72.9 358,421 1

Unique (cost=9,622,941.78..9,928,168.23 rows=26,145,328 width=24) (actual time=80,765.481..89,121.268 rows=358,421 loops=1)

3. 55,906.358 84,874.584 ↑ 1.3 30,316,270 1

Sort (cost=9,622,941.78..9,724,683.93 rows=40,696,860 width=24) (actual time=80,765.480..84,874.584 rows=30,316,270 loops=1)

  • Sort Key: all_reports.system_uuid, all_reports.rule_id
  • Sort Method: external sort Disk: 889,912kB
4. 11,517.893 28,968.226 ↑ 1.3 30,316,270 1

Hash Join (cost=192.89..1,975,361.87 rows=40,696,860 width=24) (actual time=1.584..28,968.226 rows=30,316,270 loops=1)

  • Hash Cond: (all_reports.rule_id = api_rule.id)
5. 17,448.856 17,448.856 ↑ 1.0 43,812,342 1

Index Only Scan using all_reports_asr_index on all_reports (cost=0.70..1,857,955.52 rows=44,478,790 width=20) (actual time=0.075..17,448.856 rows=43,812,342 loops=1)

  • Index Cond: (account = '729650'::text)
  • Heap Fetches: 0
6. 0.292 1.477 ↑ 1.0 985 1

Hash (cost=179.82..179.82 rows=990 width=4) (actual time=1.477..1.477 rows=985 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 43kB
7. 1.185 1.185 ↑ 1.0 985 1

Seq Scan on api_rule (cost=0.00..179.82 rows=990 width=4) (actual time=0.015..1.185 rows=985 loops=1)

  • Filter: active
  • Rows Removed by Filter: 91
Planning time : 0.598 ms
Execution time : 89,326.815 ms