explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WDhJ : Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: plan #JDQi; plan #Gypj; plan #kMX; plan #WGSq; plan #7Je1; plan #MT3n

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 86.353 529.854 ↓ 1.0 2,229 1

GroupAggregate (cost=26,218.89..26,976.07 rows=2,228 width=64) (actual time=383.703..529.854 rows=2,229 loops=1)

  • Group Key: r.tenant_id, r.asset_id
2. 225.491 443.501 ↓ 7.1 516,318 1

Sort (cost=26,218.89..26,401.23 rows=72,933 width=48) (actual time=383.556..443.501 rows=516,318 loops=1)

  • Sort Key: r.asset_id
  • Sort Method: external merge Disk: 29360kB
3. 127.581 218.010 ↓ 7.1 516,318 1

Hash Join (cost=624.72..18,080.99 rows=72,933 width=48) (actual time=1.436..218.010 rows=516,318 loops=1)

  • Hash Cond: (r.access_id = aa.access_id)
4. 89.017 89.017 ↑ 1.0 571,371 1

Seq Scan on security_policy_risk r (cost=0.00..15,956.14 rows=571,371 width=48) (actual time=0.010..89.017 rows=571,371 loops=1)

  • Filter: (tenant_id = '7b26e0d9-d493-30c1-ac75-38d68d70538d'::uuid)
5. 0.411 1.412 ↑ 1.0 2,763 1

Hash (cost=590.18..590.18 rows=2,763 width=32) (actual time=1.412..1.412 rows=2,763 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 205kB
6. 0.793 1.001 ↑ 1.0 2,763 1

Bitmap Heap Scan on access_application aa (cost=316.73..590.18 rows=2,763 width=32) (actual time=0.235..1.001 rows=2,763 loops=1)

  • Recheck Cond: ((tenant_id = '7b26e0d9-d493-30c1-ac75-38d68d70538d'::uuid) AND (application_id = '8a8bb7cd-343a-32ad-99b7-d762030857a2'::uuid))
  • Heap Blocks: exact=148
7. 0.208 0.208 ↑ 1.0 2,763 1

Bitmap Index Scan on idx_access_application_application (cost=0.00..316.04 rows=2,763 width=0) (actual time=0.208..0.208 rows=2,763 loops=1)

  • Index Cond: ((tenant_id = '7b26e0d9-d493-30c1-ac75-38d68d70538d'::uuid) AND (application_id = '8a8bb7cd-343a-32ad-99b7-d762030857a2'::uuid))
Planning time : 0.372 ms
Execution time : 537.693 ms