explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zJ9O

Settings
# exclusive inclusive rows x rows loops node
1. 0.168 40,900.448 ↑ 1.0 200 1

Limit (cost=0.99..1,324,907.51 rows=200 width=22) (actual time=68.029..40,900.448 rows=200 loops=1)

2. 1.528 40,900.280 ↑ 11.6 200 1

Nested Loop (cost=0.99..15,368,916.67 rows=2,320 width=22) (actual time=68.028..40,900.280 rows=200 loops=1)

3. 2.352 2.352 ↑ 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.060..2.352 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. 70.400 70.400 ↑ 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.344..0.352 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. 1,820.600 40,826.000 ↑ 1.0 1 200

Aggregate (cost=6,612.15..6,612.16 rows=1 width=4) (actual time=204.130..204.130 rows=1 loops=200)

7. 39,005.400 39,005.400 ↓ 10.9 39,649 200

Index Only Scan using own_fund_detail_factset_fund_id_report_date_idx on own_fund_detail (cost=0.57..6,603.06 rows=3,637 width=4) (actual time=1.010..195.027 rows=39,649 loops=200)

  • Index Cond: ((factset_fund_id = fund_holds.factset_fund_id) AND (report_date >= '2017-05-08'::date) AND (report_date <= '2019-05-08'::date))
  • Heap Fetches: 6334947
Planning time : 1.668 ms
Execution time : 40,900.643 ms