explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EBY3 : Optimization for: Optimization for: Optimization for: Optimization for: plan #EYye; plan #ycd5; plan #kIT8; plan #XvIj

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 90.784 551.478 ↓ 1.0 2,229 1

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

  • Group Key: r.tenant_id, r.asset_id
2. 236.706 460.694 ↓ 7.1 516,318 1

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

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

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

  • Hash Cond: (r.access_id = aa.access_id)
4. 89.340 89.340 ↑ 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.340 rows=571,371 loops=1)

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

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

  • Buckets: 4096 Batches: 1 Memory Usage: 205kB
6. 0.771 0.982 ↑ 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.261..0.982 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.211 0.211 ↑ 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.211..0.211 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.420 ms
Execution time : 559.004 ms