explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7u5E

Settings
# exclusive inclusive rows x rows loops node
1. 0.180 26,586.776 ↑ 1.0 200 1

Limit (cost=0.99..3,743,354.09 rows=200 width=22) (actual time=49.686..26,586.776 rows=200 loops=1)

2. 1.740 26,586.596 ↑ 11.6 200 1

Nested Loop (cost=0.99..43,422,896.97 rows=2,320 width=22) (actual time=49.684..26,586.596 rows=200 loops=1)

3. 1.056 1.056 ↑ 20.4 200 1

Index Scan using own_fund_detail_fsym_id_report_date_idx on own_fund_detail fund_holds (cost=0.57..16,511.64 rows=4,088 width=18) (actual time=0.052..1.056 rows=200 loops=1)

  • Index Cond: ((fsym_id = 'B3MR0T-S'::bpchar) AND (report_date >= '2017-05-08'::date) AND (report_date <= '2019-05-08'::date))
4. 4.200 4.200 ↑ 1.0 1 200

Index Only Scan using own_ent_funds_factset_fund_id_current_report_date_active_flag_i on own_ent_funds ent (cost=0.42..2.97 rows=1 width=9) (actual time=0.020..0.021 rows=1 loops=200)

  • Index Cond: ((factset_fund_id = fund_holds.factset_fund_id) AND (active_flag = 1))
  • Heap Fetches: 177
5.          

SubPlan (forNested Loop)

6. 3,958.400 26,579.600 ↑ 1.0 1 200

Aggregate (cost=18,704.38..18,704.39 rows=1 width=4) (actual time=132.897..132.898 rows=1 loops=200)

7. 22,621.200 22,621.200 ↓ 4.9 77,456 200

Index Scan using own_fund_detail_factset_fund_id on own_fund_detail (cost=0.57..18,664.55 rows=15,933 width=4) (actual time=0.893..113.106 rows=77,456 loops=200)

  • Index Cond: (factset_fund_id = fund_holds.factset_fund_id)