explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0Lho

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

Sort (cost=526,249,335.62..531,734,873.34 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
2. 0.000 0.000 ↓ 0.0

Merge Join (cost=45,383,067.66..80,808,633.44 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)
3. 0.000 0.000 ↓ 0.0

Sort (cost=203,624.65..203,709.17 rows=33,809 width=27) (actual rows= loops=)

  • Sort Key: own_fund_detail.factset_fund_id
4. 0.000 0.000 ↓ 0.0

Hash Join (cost=199,475.42..201,081.35 rows=33,809 width=27) (actual rows= loops=)

  • Hash Cond: (own_fund_detail.fsym_id = s.fsym_id)
5. 0.000 0.000 ↓ 0.0

Hash Join (cost=191,973.77..193,114.82 rows=33,809 width=36) (actual rows= loops=)

  • Hash Cond: (own_fund_detail.fsym_id = sar.fsym_id)
6. 0.000 0.000 ↓ 0.0

HashAggregate (cost=184,472.12..184,810.21 rows=33,809 width=27) (actual rows= loops=)

  • Group Key: own_fund_detail.factset_fund_id, own_fund_detail.fsym_id, own_ent_funds.factset_inst_entity_id
7. 0.000 0.000 ↓ 0.0

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

8. 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)
9. 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)
10. 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))
11. 0.000 0.000 ↓ 0.0

Hash (cost=4,927.40..4,927.40 rows=205,940 width=9) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Seq Scan on own_sec_coverage sar (cost=0.00..4,927.40 rows=205,940 width=9) (actual rows= loops=)

  • Filter: (fsym_id IS NOT NULL)
13. 0.000 0.000 ↓ 0.0

Hash (cost=4,927.40..4,927.40 rows=205,940 width=9) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on own_sec_coverage s (cost=0.00..4,927.40 rows=205,940 width=9) (actual rows= loops=)

15. 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=)

16. 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=)

17. 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))
18. 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)