explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DNS9

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=526,862,317.81..548,804,896.84 rows=2,194,215,088 width=39) (actual rows= loops=)

  • Merge Cond: ((own_fund_detail.factset_fund_id = adjh.factset_entity_id) AND (own_fund_detail_1.report_date = adjh.report_date) AND (sar.fsym_id = adjh.fsym_id))
2. 0.000 0.000 ↓ 0.0

Sort (cost=526,280,195.38..531,765,733.10 rows=2,194,215,088 width=31) (actual rows= loops=)

  • Sort Key: own_fund_detail.factset_fund_id, own_fund_detail_1.report_date DESC, sar.fsym_id
3. 0.000 0.000 ↓ 0.0

Merge Join (cost=45,366,205.71..80,839,493.20 rows=2,194,215,088 width=31) (actual rows= loops=)

  • Merge Cond: (own_fund_detail.factset_fund_id = own_fund_detail_1.factset_fund_id)
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=186,762.69..234,568.93 rows=33,809 width=27) (actual rows= loops=)

  • Join Filter: (own_fund_detail.fsym_id = s.fsym_id)
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=186,762.27..216,987.56 rows=33,809 width=36) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Unique (cost=186,761.85..187,015.42 rows=33,809 width=27) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Sort (cost=186,761.85..186,846.38 rows=33,809 width=27) (actual rows= loops=)

  • Sort Key: own_fund_detail.factset_fund_id, own_fund_detail.fsym_id
8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=5.12..184,218.55 rows=33,809 width=27) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on own_ent_funds (cost=4.55..68.66 rows=17 width=18) (actual rows= loops=)

  • Recheck Cond: (factset_inst_entity_id = '0G7ZFP-E'::bpchar)
10. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on own_ent_funds_factset_inst_entity_id_idx (cost=0.00..4.55 rows=17 width=0) (actual rows= loops=)

  • Index Cond: (factset_inst_entity_id = '0G7ZFP-E'::bpchar)
11. 0.000 0.000 ↓ 0.0

Index Only Scan using own_fund_detail_pkey on own_fund_detail (cost=0.57..10,656.33 rows=17,602 width=18) (actual rows= loops=)

  • Index Cond: ((factset_fund_id = own_ent_funds.factset_fund_id) AND (factset_fund_id IS NOT NULL))
12. 0.000 0.000 ↓ 0.0

Index Only Scan using own_sec_coverage_fsym_id_idx on own_sec_coverage sar (cost=0.42..0.87 rows=1 width=9) (actual rows= loops=)

  • Index Cond: ((fsym_id = own_fund_detail.fsym_id) AND (fsym_id IS NOT NULL))
13. 0.000 0.000 ↓ 0.0

Index Only Scan using own_sec_coverage_fsym_id_idx on own_sec_coverage s (cost=0.42..0.51 rows=1 width=9) (actual rows= loops=)

  • Index Cond: (fsym_id = sar.fsym_id)
14. 0.000 0.000 ↓ 0.0

Materialize (cost=45,179,443.02..47,724,063.59 rows=12,980,065 width=13) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Unique (cost=45,179,443.02..47,561,812.78 rows=12,980,065 width=21) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Sort (cost=45,179,443.02..45,775,035.46 rows=238,236,976 width=21) (actual rows= loops=)

  • Sort Key: own_fund_detail_1.factset_fund_id, own_fund_detail_1.report_date, ((date_trunc('day'::text, (own_fund_detail_1.report_date)::timestamp with time zone) - '540 days'::interval))
17. 0.000 0.000 ↓ 0.0

Seq Scan on own_fund_detail own_fund_detail_1 (cost=0.00..7,145,642.08 rows=238,236,976 width=21) (actual rows= loops=)

  • Filter: (report_date IS NOT NULL)
18. 0.000 0.000 ↓ 0.0

Sort (cost=582,122.42..582,206.95 rows=33,809 width=30) (actual rows= loops=)

  • Sort Key: adjh.factset_entity_id, adjh.report_date DESC, adjh.fsym_id
19. 0.000 0.000 ↓ 0.0

Subquery Scan on adjh (cost=578,818.42..579,579.12 rows=33,809 width=30) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Unique (cost=578,818.42..579,241.03 rows=33,809 width=39) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Sort (cost=578,818.42..578,902.94 rows=33,809 width=39) (actual rows= loops=)

  • Sort Key: own_fund_detail_2.factset_fund_id, own_fund_detail_2.fsym_id, own_fund_detail_2.reported_holding, own_fund_detail_2.report_date
22. 0.000 0.000 ↓ 0.0

Nested Loop (cost=5.12..576,275.12 rows=33,809 width=39) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on own_ent_funds own_ent_funds_1 (cost=4.55..68.66 rows=17 width=18) (actual rows= loops=)

  • Recheck Cond: (factset_inst_entity_id = '0G7ZFP-E'::bpchar)
24. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on own_ent_funds_factset_inst_entity_id_idx (cost=0.00..4.55 rows=17 width=0) (actual rows= loops=)

  • Index Cond: (factset_inst_entity_id = '0G7ZFP-E'::bpchar)
25. 0.000 0.000 ↓ 0.0

Index Scan using own_fund_detail_pkey on own_fund_detail own_fund_detail_2 (cost=0.57..33,718.48 rows=17,602 width=30) (actual rows= loops=)

  • Index Cond: (factset_fund_id = own_ent_funds_1.factset_fund_id)