explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1dH6

Settings
# exclusive inclusive rows x rows loops node
1. 6.355 129.992 ↑ 1.2 16,716 1

Hash Join (cost=839.07..45,263.88 rows=19,301 width=116) (actual time=7.293..129.992 rows=16,716 loops=1)

  • Hash Cond: (i.aim__investment_in_account__c = co.company_id)
2. 8.489 122.185 ↑ 1.1 17,954 1

Hash Join (cost=501.59..44,661.01 rows=19,301 width=116) (actual time=5.827..122.185 rows=17,954 loops=1)

  • Hash Cond: (i.aim__investment_in_deal__c = d.aim__aim_deal_id__c)
3. 15.164 107.923 ↑ 1.1 17,954 1

Nested Loop (cost=0.67..43,894.70 rows=19,302 width=82) (actual time=0.035..107.923 rows=17,954 loops=1)

4. 1.229 1.229 ↑ 1.0 9,153 1

Seq Scan on tmp_investor_dim inv (cost=0.00..199.53 rows=9,153 width=19) (actual time=0.007..1.229 rows=9,153 loops=1)

5. 9.153 91.530 ↑ 2.0 2 9,153

Bitmap Heap Scan on aim_external_investment i (cost=0.67..4.73 rows=4 width=101) (actual time=0.010..0.010 rows=2 loops=9,153)

  • Recheck Cond: ((aim__investment_by_account__c = inv.investor_aim_id) OR (investment_by_contact__c = inv.investor_aim_id))
  • Heap Blocks: exact=15884
6. 9.153 82.377 ↓ 0.0 0 9,153

BitmapOr (cost=0.67..0.67 rows=4 width=0) (actual time=0.009..0.009 rows=0 loops=9,153)

7. 27.459 27.459 ↑ 3.0 1 9,153

Bitmap Index Scan on idx_aei_aid (cost=0.00..0.34 rows=3 width=0) (actual time=0.003..0.003 rows=1 loops=9,153)

  • Index Cond: (aim__investment_by_account__c = inv.investor_aim_id)
8. 45.765 45.765 ↑ 1.0 1 9,153

Bitmap Index Scan on idx_aei_cid (cost=0.00..0.33 rows=1 width=0) (actual time=0.005..0.005 rows=1 loops=9,153)

  • Index Cond: (investment_by_contact__c = inv.investor_aim_id)
9. 1.868 5.773 ↑ 1.0 6,352 1

Hash (cost=421.52..421.52 rows=6,352 width=72) (actual time=5.773..5.773 rows=6,352 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 714kB
10. 3.905 3.905 ↑ 1.0 6,352 1

Seq Scan on aim_deal d (cost=0.00..421.52 rows=6,352 width=72) (actual time=0.005..3.905 rows=6,352 loops=1)

11. 0.286 1.452 ↑ 1.0 1,619 1

Hash (cost=317.24..317.24 rows=1,619 width=19) (actual time=1.452..1.452 rows=1,619 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 97kB
12. 1.166 1.166 ↑ 1.0 1,619 1

Seq Scan on company_dim_v3 co (cost=0.00..317.24 rows=1,619 width=19) (actual time=0.009..1.166 rows=1,619 loops=1)

  • Filter: ((company_type)::text = 'Graduate'::text)