explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 89.787 535.166 ↓ 1.0 2,229 1

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

  • Group Key: r.tenant_id, r.asset_id
2. 229.116 445.379 ↓ 7.1 516,318 1

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

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

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

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

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

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

  • Buckets: 4096 Batches: 1 Memory Usage: 205kB
6. 0.807 1.045 ↑ 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.265..1.045 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.238 0.238 ↑ 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.238..0.238 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.509 ms
Execution time : 542.726 ms