explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nJBg : new

Settings
# exclusive inclusive rows x rows loops node
1. 48.219 14,215.381 ↓ 8.0 6,617 1

Nested Loop Left Join (cost=425,695.71..467,139.44 rows=824 width=640) (actual time=11,236.137..14,215.381 rows=6,617 loops=1)

2. 8.792 12,268.083 ↓ 8.0 6,617 1

Hash Left Join (cost=425,695.14..445,895.88 rows=824 width=520) (actual time=11,235.706..12,268.083 rows=6,617 loops=1)

  • Hash Cond: (own_ent_funds.fund_type = fund_type_map.fund_type_code)
3. 8.423 12,259.263 ↓ 8.0 6,617 1

Hash Left Join (cost=425,693.72..445,883.12 rows=824 width=456) (actual time=11,235.668..12,259.263 rows=6,617 loops=1)

  • Hash Cond: (ent_entity_metro_areas.metro_id = metro_map.metro_code)
4. 14.835 12,250.630 ↓ 8.0 6,617 1

Nested Loop Left Join (cost=425,687.55..445,865.63 rows=824 width=440) (actual time=11,235.445..12,250.630 rows=6,617 loops=1)

5. 7.956 12,103.455 ↓ 8.0 6,617 1

Hash Left Join (cost=425,687.12..445,476.16 rows=824 width=445) (actual time=11,235.420..12,103.455 rows=6,617 loops=1)

  • Hash Cond: (country_map.region_code = region_map.region_code)
6. 9.326 12,095.483 ↓ 8.0 6,617 1

Hash Left Join (cost=425,685.94..445,463.65 rows=824 width=379) (actual time=11,235.394..12,095.483 rows=6,617 loops=1)

  • Hash Cond: (fund_entity.iso_country = country_map.iso_country)
7. 14.235 12,085.846 ↓ 8.0 6,617 1

Nested Loop Left Join (cost=425,677.87..445,444.25 rows=824 width=367) (actual time=11,235.070..12,085.846 rows=6,617 loops=1)

8. 9.417 11,926.037 ↓ 8.0 6,617 1

Nested Loop Left Join (cost=425,677.45..439,845.57 rows=824 width=326) (actual time=11,235.036..11,926.037 rows=6,617 loops=1)

9. 13.866 11,777.663 ↓ 8.0 6,617 1

Nested Loop Left Join (cost=425,677.02..438,053.76 rows=824 width=307) (actual time=11,234.991..11,777.663 rows=6,617 loops=1)

10. 14.577 11,585.138 ↓ 8.0 6,617 1

Nested Loop Left Join (cost=425,676.59..434,595.37 rows=824 width=276) (actual time=11,234.969..11,585.138 rows=6,617 loops=1)

11. 11.652 11,398.519 ↓ 8.0 6,617 1

Hash Left Join (cost=425,676.16..431,136.99 rows=824 width=239) (actual time=11,234.937..11,398.519 rows=6,617 loops=1)

  • Hash Cond: (current_factset_fund_holdings.factset_fund_id = q4_fund_values.factset_fund_id)
12. 14.749 11,336.985 ↓ 8.0 6,617 1

Nested Loop Left Join (cost=423,319.90..428,769.40 rows=824 width=223) (actual time=11,184.966..11,336.985 rows=6,617 loops=1)

13. 21.893 11,236.215 ↓ 8.0 6,617 1

Merge Left Join (cost=423,319.48..423,342.48 rows=824 width=192) (actual time=11,184.939..11,236.215 rows=6,617 loops=1)

  • Merge Cond: ((current_factset_fund_holdings.fsym_id = factset_prev_fund_holdings.fsym_id) AND (current_factset_fund_holdings.factset_fund_id = factset_prev_fund_holdings.factset_fund_id))
14.          

CTE report_dates

15. 500.189 500.189 ↓ 1.1 673,725 1

Seq Scan on q4_fund_dates (cost=0.00..33,672.26 rows=614,204 width=13) (actual time=0.029..500.189 rows=673,725 loops=1)

  • Filter: ((report_date >= '2016-12-31'::date) AND (report_date <= '2019-06-10'::date))
  • Rows Removed by Filter: 955937
16.          

CTE factset_fund_holdings

17. 111.993 6,477.472 ↑ 2.1 77,625 1

WindowAgg (cost=183,525.54..189,198.61 rows=164,893 width=46) (actual time=6,154.080..6,477.472 rows=77,625 loops=1)

18. 129.760 6,365.479 ↑ 2.1 77,625 1

Merge Left Join (cost=183,525.54..186,312.98 rows=164,893 width=54) (actual time=6,154.073..6,365.479 rows=77,625 loops=1)

  • Merge Cond: ((own_fund_detail.factset_fund_id = adjh.factset_fund_id) AND (ad.report_date = adjh.report_date))
  • Join Filter: (adjh.fsym_id = sar.fsym_id)
19. 191.423 4,951.453 ↑ 2.1 77,625 1

Sort (cost=109,573.73..109,985.96 rows=164,893 width=46) (actual time=4,922.775..4,951.453 rows=77,625 loops=1)

  • Sort Key: own_fund_detail.factset_fund_id, ad.report_date DESC
  • Sort Method: quicksort Memory: 13973kB
20. 242.269 4,760.030 ↑ 2.1 77,625 1

Merge Join (cost=92,520.94..95,284.79 rows=164,893 width=46) (actual time=4,190.044..4,760.030 rows=77,625 loops=1)

  • Merge Cond: (ad.factset_fund_id = own_fund_detail.factset_fund_id)
21. 2,102.954 3,801.565 ↓ 308.4 540,695 1

Sort (cost=20,421.85..20,426.23 rows=1,753 width=58) (actual time=3,573.334..3,801.565 rows=540,695 loops=1)

  • Sort Key: ad.factset_fund_id
  • Sort Method: external merge Disk: 23256kB
22. 270.466 1,698.611 ↓ 308.4 540,695 1

Nested Loop (cost=4,917.71..20,327.40 rows=1,753 width=58) (actual time=78.780..1,698.611 rows=540,695 loops=1)

23. 0.042 0.042 ↑ 1.0 1 1

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

  • Index Cond: (fsym_id = 'BHM9TN-S'::bpchar)
  • Heap Fetches: 1
24. 364.109 1,428.103 ↓ 308.4 540,695 1

Hash Join (cost=4,917.29..20,301.43 rows=1,753 width=49) (actual time=78.737..1,428.103 rows=540,695 loops=1)

  • Hash Cond: (ad.factset_fund_id = ent.factset_fund_id)
25. 985.900 985.900 ↓ 176.3 541,443 1

CTE Scan on report_dates ad (cost=0.00..15,355.10 rows=3,071 width=40) (actual time=0.046..985.900 rows=541,443 loops=1)

  • Filter: ((report_date >= '2017-06-10'::date) AND (report_date <= '2019-06-10'::date))
  • Rows Removed by Filter: 132282
26. 26.407 78.094 ↓ 1.0 68,140 1

Hash (cost=4,065.65..4,065.65 rows=68,131 width=9) (actual time=78.093..78.094 rows=68,140 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 3753kB
27. 51.687 51.687 ↓ 1.0 68,140 1

Seq Scan on own_ent_funds ent (cost=0.00..4,065.65 rows=68,131 width=9) (actual time=0.009..51.687 rows=68,140 loops=1)

  • Filter: (active_flag = 1)
  • Rows Removed by Filter: 51192
28. 21.463 716.196 ↓ 4.2 78,987 1

Materialize (cost=72,099.09..72,428.28 rows=18,809 width=42) (actual time=616.702..716.196 rows=78,987 loops=1)

29. 39.919 694.733 ↑ 2.4 7,979 1

Unique (cost=72,099.09..72,193.17 rows=18,809 width=54) (actual time=616.697..694.733 rows=7,979 loops=1)

30. 332.937 654.814 ↓ 7.6 143,529 1

Sort (cost=72,099.09..72,146.13 rows=18,816 width=54) (actual time=616.696..654.814 rows=143,529 loops=1)

  • Sort Key: own_fund_detail.factset_fund_id
  • Sort Method: quicksort Memory: 17358kB
31. 287.683 321.877 ↓ 7.6 143,529 1

Bitmap Heap Scan on own_fund_detail (cost=442.39..70,763.18 rows=18,816 width=54) (actual time=36.954..321.877 rows=143,529 loops=1)

  • Recheck Cond: (fsym_id = 'BHM9TN-S'::bpchar)
  • Heap Blocks: exact=13494
32. 34.194 34.194 ↓ 7.7 144,981 1

Bitmap Index Scan on own_fund_detail_fsym_id_report_date_idx (cost=0.00..437.69 rows=18,816 width=0) (actual time=34.194..34.194 rows=144,981 loops=1)

  • Index Cond: (fsym_id = 'BHM9TN-S'::bpchar)
33. 266.654 1,284.266 ↓ 7.6 143,529 1

Sort (cost=73,951.81..73,998.84 rows=18,809 width=30) (actual time=1,231.285..1,284.266 rows=143,529 loops=1)

  • Sort Key: adjh.factset_fund_id, adjh.report_date DESC
  • Sort Method: quicksort Memory: 17358kB
34. 78.384 1,017.612 ↓ 7.6 143,529 1

Subquery Scan on adjh (cost=72,099.09..72,616.46 rows=18,809 width=30) (actual time=783.849..1,017.612 rows=143,529 loops=1)

35. 100.241 939.228 ↓ 7.6 143,529 1

Unique (cost=72,099.09..72,428.37 rows=18,809 width=54) (actual time=783.847..939.228 rows=143,529 loops=1)

36. 693.343 838.987 ↓ 7.6 143,529 1

Sort (cost=72,099.09..72,146.13 rows=18,816 width=54) (actual time=783.845..838.987 rows=143,529 loops=1)

  • Sort Key: own_fund_detail_1.factset_fund_id, own_fund_detail_1.adj_holding, own_fund_detail_1.report_date, own_fund_detail_1.reported_holding, own_fund_detail_1.adj_mv, own_fund_detail_1.reported_mv
  • Sort Method: quicksort Memory: 26321kB
37. 118.981 145.644 ↓ 7.6 143,529 1

Bitmap Heap Scan on own_fund_detail own_fund_detail_1 (cost=442.39..70,763.18 rows=18,816 width=54) (actual time=29.438..145.644 rows=143,529 loops=1)

  • Recheck Cond: (fsym_id = 'BHM9TN-S'::bpchar)
  • Heap Blocks: exact=13494
38. 26.663 26.663 ↓ 7.7 144,981 1

Bitmap Index Scan on own_fund_detail_fsym_id_report_date_idx (cost=0.00..437.69 rows=18,816 width=0) (actual time=26.663..26.663 rows=144,981 loops=1)

  • Index Cond: (fsym_id = 'BHM9TN-S'::bpchar)
39.          

CTE factset_prev_fund_holdings

40. 87.965 4,566.205 ↑ 2.0 83,931 1

WindowAgg (cost=183,525.54..189,198.61 rows=164,893 width=46) (actual time=4,303.109..4,566.205 rows=83,931 loops=1)

41. 109.281 4,478.240 ↑ 2.0 83,931 1

Merge Left Join (cost=183,525.54..186,312.98 rows=164,893 width=54) (actual time=4,303.102..4,478.240 rows=83,931 loops=1)

  • Merge Cond: ((own_fund_detail_2.factset_fund_id = adjh_1.factset_fund_id) AND (ad_1.report_date = adjh_1.report_date))
  • Join Filter: (adjh_1.fsym_id = sar_1.fsym_id)
42. 225.273 3,284.662 ↑ 2.0 83,931 1

Sort (cost=109,573.73..109,985.96 rows=164,893 width=46) (actual time=3,258.421..3,284.662 rows=83,931 loops=1)

  • Sort Key: own_fund_detail_2.factset_fund_id, ad_1.report_date DESC
  • Sort Method: quicksort Memory: 14867kB
43. 250.863 3,059.389 ↑ 2.0 83,931 1

Merge Join (cost=92,520.94..95,284.79 rows=164,893 width=46) (actual time=2,478.722..3,059.389 rows=83,931 loops=1)

  • Merge Cond: (ad_1.factset_fund_id = own_fund_detail_2.factset_fund_id)
44. 940.132 2,233.749 ↓ 329.0 576,752 1

Sort (cost=20,421.85..20,426.23 rows=1,753 width=58) (actual time=2,016.179..2,233.749 rows=576,752 loops=1)

  • Sort Key: ad_1.factset_fund_id
  • Sort Method: external merge Disk: 24808kB
45. 377.700 1,293.617 ↓ 329.0 576,752 1

Nested Loop (cost=4,917.71..20,327.40 rows=1,753 width=58) (actual time=66.826..1,293.617 rows=576,752 loops=1)

46. 0.034 0.034 ↑ 1.0 1 1

Index Only Scan using own_sec_coverage_fsym_id_idx on own_sec_coverage sar_1 (cost=0.42..8.44 rows=1 width=9) (actual time=0.030..0.034 rows=1 loops=1)

  • Index Cond: (fsym_id = 'BHM9TN-S'::bpchar)
  • Heap Fetches: 1
47. 506.300 915.883 ↓ 329.0 576,752 1

Hash Join (cost=4,917.29..20,301.43 rows=1,753 width=49) (actual time=66.793..915.883 rows=576,752 loops=1)

  • Hash Cond: (ad_1.factset_fund_id = ent_1.factset_fund_id)
48. 342.948 342.948 ↓ 188.1 577,648 1

CTE Scan on report_dates ad_1 (cost=0.00..15,355.10 rows=3,071 width=40) (actual time=0.006..342.948 rows=577,648 loops=1)

  • Filter: ((report_date >= '2016-12-31'::date) AND (report_date <= '2018-12-31'::date))
  • Rows Removed by Filter: 96077
49. 24.417 66.635 ↓ 1.0 68,140 1

Hash (cost=4,065.65..4,065.65 rows=68,131 width=9) (actual time=66.635..66.635 rows=68,140 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 3753kB
50. 42.218 42.218 ↓ 1.0 68,140 1

Seq Scan on own_ent_funds ent_1 (cost=0.00..4,065.65 rows=68,131 width=9) (actual time=0.010..42.218 rows=68,140 loops=1)

  • Filter: (active_flag = 1)
  • Rows Removed by Filter: 51192
51. 23.767 574.777 ↓ 4.5 85,348 1

Materialize (cost=72,099.09..72,428.28 rows=18,809 width=42) (actual time=462.537..574.777 rows=85,348 loops=1)

52. 44.554 551.010 ↑ 2.4 7,979 1

Unique (cost=72,099.09..72,193.17 rows=18,809 width=54) (actual time=462.532..551.010 rows=7,979 loops=1)

53. 373.049 506.456 ↓ 7.6 143,529 1

Sort (cost=72,099.09..72,146.13 rows=18,816 width=54) (actual time=462.529..506.456 rows=143,529 loops=1)

  • Sort Key: own_fund_detail_2.factset_fund_id
  • Sort Method: quicksort Memory: 17358kB
54. 107.061 133.407 ↓ 7.6 143,529 1

Bitmap Heap Scan on own_fund_detail own_fund_detail_2 (cost=442.39..70,763.18 rows=18,816 width=54) (actual time=29.101..133.407 rows=143,529 loops=1)

  • Recheck Cond: (fsym_id = 'BHM9TN-S'::bpchar)
  • Heap Blocks: exact=13494
55. 26.346 26.346 ↓ 7.7 144,981 1

Bitmap Index Scan on own_fund_detail_fsym_id_report_date_idx (cost=0.00..437.69 rows=18,816 width=0) (actual time=26.346..26.346 rows=144,981 loops=1)

  • Index Cond: (fsym_id = 'BHM9TN-S'::bpchar)
56. 355.847 1,084.297 ↓ 7.6 143,529 1

Sort (cost=73,951.81..73,998.84 rows=18,809 width=30) (actual time=1,044.660..1,084.297 rows=143,529 loops=1)

  • Sort Key: adjh_1.factset_fund_id, adjh_1.report_date DESC
  • Sort Method: quicksort Memory: 17358kB
57. 87.761 728.450 ↓ 7.6 143,529 1

Subquery Scan on adjh_1 (cost=72,099.09..72,616.46 rows=18,809 width=30) (actual time=480.302..728.450 rows=143,529 loops=1)

58. 105.034 640.689 ↓ 7.6 143,529 1

Unique (cost=72,099.09..72,428.37 rows=18,809 width=54) (actual time=480.300..640.689 rows=143,529 loops=1)

59. 449.230 535.655 ↓ 7.6 143,529 1

Sort (cost=72,099.09..72,146.13 rows=18,816 width=54) (actual time=480.298..535.655 rows=143,529 loops=1)

  • Sort Key: own_fund_detail_3.factset_fund_id, own_fund_detail_3.adj_holding, own_fund_detail_3.report_date, own_fund_detail_3.reported_holding, own_fund_detail_3.adj_mv, own_fund_detail_3.reported_mv
  • Sort Method: quicksort Memory: 26321kB
60. 60.611 86.425 ↓ 7.6 143,529 1

Bitmap Heap Scan on own_fund_detail own_fund_detail_3 (cost=442.39..70,763.18 rows=18,816 width=54) (actual time=28.541..86.425 rows=143,529 loops=1)

  • Recheck Cond: (fsym_id = 'BHM9TN-S'::bpchar)
  • Heap Blocks: exact=13494
61. 25.814 25.814 ↓ 7.7 144,981 1

Bitmap Index Scan on own_fund_detail_fsym_id_report_date_idx (cost=0.00..437.69 rows=18,816 width=0) (actual time=25.814..25.814 rows=144,981 loops=1)

  • Index Cond: (fsym_id = 'BHM9TN-S'::bpchar)
62. 19.179 6,591.338 ↓ 8.0 6,617 1

Merge Left Join (cost=7,500.00..7,512.53 rows=824 width=112) (actual time=6,565.769..6,591.338 rows=6,617 loops=1)

  • Merge Cond: ((current_factset_fund_holdings.fsym_id = previous_factset_fund_holdings.fsym_id) AND (current_factset_fund_holdings.factset_fund_id = previous_factset_fund_holdings.factset_fund_id))
63. 8.158 6,554.328 ↓ 8.0 6,617 1

Sort (cost=3,750.00..3,752.06 rows=824 width=92) (actual time=6,551.331..6,554.328 rows=6,617 loops=1)

  • Sort Key: current_factset_fund_holdings.fsym_id, current_factset_fund_holdings.factset_fund_id
  • Sort Method: quicksort Memory: 709kB
64. 6,546.170 6,546.170 ↓ 8.0 6,617 1

CTE Scan on factset_fund_holdings current_factset_fund_holdings (cost=0.00..3,710.09 rows=824 width=92) (actual time=6,154.089..6,546.170 rows=6,617 loops=1)

  • Filter: (pos = 1)
  • Rows Removed by Filter: 71008
65. 7.630 17.831 ↓ 7.7 6,338 1

Sort (cost=3,750.00..3,752.06 rows=824 width=92) (actual time=14.433..17.831 rows=6,338 loops=1)

  • Sort Key: previous_factset_fund_holdings.fsym_id, previous_factset_fund_holdings.factset_fund_id
  • Sort Method: quicksort Memory: 688kB
66. 10.201 10.201 ↓ 7.7 6,338 1

CTE Scan on factset_fund_holdings previous_factset_fund_holdings (cost=0.00..3,710.09 rows=824 width=92) (actual time=0.006..10.201 rows=6,338 loops=1)

  • Filter: (pos = 2)
  • Rows Removed by Filter: 71287
67. 8.791 4,622.984 ↓ 8.0 6,562 1

Sort (cost=3,750.00..3,752.06 rows=824 width=88) (actual time=4,619.162..4,622.984 rows=6,562 loops=1)

  • Sort Key: factset_prev_fund_holdings.fsym_id, factset_prev_fund_holdings.factset_fund_id
  • Sort Method: quicksort Memory: 705kB
68. 4,614.193 4,614.193 ↓ 8.0 6,562 1

CTE Scan on factset_prev_fund_holdings (cost=0.00..3,710.09 rows=824 width=88) (actual time=4,303.114..4,614.193 rows=6,562 loops=1)

  • Filter: (pos = 1)
  • Rows Removed by Filter: 77369
69. 86.021 86.021 ↑ 1.0 1 6,617

Index Scan using own_ent_funds_pkey on own_ent_funds (cost=0.42..6.57 rows=1 width=31) (actual time=0.013..0.013 rows=1 loops=6,617)

  • Index Cond: (current_factset_fund_holdings.factset_fund_id = factset_fund_id)
70. 26.162 49.882 ↑ 1.0 65,078 1

Hash (cost=1,542.78..1,542.78 rows=65,078 width=26) (actual time=49.881..49.882 rows=65,078 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 3926kB
71. 23.720 23.720 ↑ 1.0 65,078 1

Seq Scan on q4_fund_values (cost=0.00..1,542.78 rows=65,078 width=26) (actual time=0.008..23.720 rows=65,078 loops=1)

72. 172.042 172.042 ↑ 1.0 1 6,617

Index Scan using sym_entity_pkey on sym_entity inst_entity (cost=0.43..4.19 rows=1 width=37) (actual time=0.025..0.026 rows=1 loops=6,617)

  • Index Cond: (factset_entity_id = own_ent_funds.factset_inst_entity_id)
73. 178.659 178.659 ↑ 1.0 1 6,617

Index Scan using sym_entity_pkey on sym_entity fund_entity (cost=0.43..4.19 rows=1 width=40) (actual time=0.026..0.027 rows=1 loops=6,617)

  • Index Cond: (factset_entity_id = own_ent_funds.factset_fund_id)
74. 138.957 138.957 ↑ 1.0 1 6,617

Index Scan using h_entity_pkey on h_entity (cost=0.43..2.16 rows=1 width=37) (actual time=0.020..0.021 rows=1 loops=6,617)

  • Index Cond: (factset_entity_id = own_ent_funds.factset_fund_id)
75. 145.574 145.574 ↑ 1.0 1 6,617

Index Scan using cyclops_fund_overwrites_pkey on cyclops_fund_overwrites cyclops (cost=0.42..6.78 rows=1 width=51) (actual time=0.022..0.022 rows=1 loops=6,617)

  • Index Cond: (factset_fund_id = current_factset_fund_holdings.factset_fund_id)
76. 0.159 0.311 ↑ 1.0 270 1

Hash (cost=4.70..4.70 rows=270 width=15) (actual time=0.310..0.311 rows=270 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
77. 0.152 0.152 ↑ 1.0 270 1

Seq Scan on country_map (cost=0.00..4.70 rows=270 width=15) (actual time=0.007..0.152 rows=270 loops=1)

78. 0.008 0.016 ↑ 1.0 8 1

Hash (cost=1.08..1.08 rows=8 width=76) (actual time=0.016..0.016 rows=8 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
79. 0.008 0.008 ↑ 1.0 8 1

Seq Scan on region_map (cost=0.00..1.08 rows=8 width=76) (actual time=0.004..0.008 rows=8 loops=1)

80. 132.340 132.340 ↑ 1.0 1 6,617

Index Scan using ent_entity_metro_areas_pkey on ent_entity_metro_areas (cost=0.43..0.46 rows=1 width=13) (actual time=0.020..0.020 rows=1 loops=6,617)

  • Index Cond: (factset_entity_id = inst_entity.factset_entity_id)
81. 0.095 0.210 ↑ 1.0 185 1

Hash (cost=3.85..3.85 rows=185 width=24) (actual time=0.210..0.210 rows=185 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
82. 0.115 0.115 ↑ 1.0 185 1

Seq Scan on metro_map (cost=0.00..3.85 rows=185 width=24) (actual time=0.011..0.115 rows=185 loops=1)

83. 0.013 0.028 ↑ 1.0 19 1

Hash (cost=1.19..1.19 rows=19 width=84) (actual time=0.028..0.028 rows=19 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
84. 0.015 0.015 ↑ 1.0 19 1

Seq Scan on fund_type_map (cost=0.00..1.19 rows=19 width=84) (actual time=0.005..0.015 rows=19 loops=1)

85. 79.404 79.404 ↑ 2.0 1 6,617

Index Scan using own_sec_prices_pkey on own_sec_prices prices (cost=0.57..11.33 rows=2 width=45) (actual time=0.011..0.012 rows=1 loops=6,617)

  • Index Cond: ((fsym_id = current_factset_fund_holdings.fsym_id) AND (price_date = (date_trunc('month'::text, (current_factset_fund_holdings.report_date)::timestamp with time zone) - '1 day'::interval)))
86.          

SubPlan (forNested Loop Left Join)

87. 258.063 1,819.675 ↑ 1.0 1 6,617

Aggregate (cost=14.39..14.40 rows=1 width=32) (actual time=0.275..0.275 rows=1 loops=6,617)

88. 35.013 1,561.612 ↓ 2.0 2 6,617

Nested Loop Left Join (cost=8.59..14.39 rows=1 width=138) (actual time=0.146..0.236 rows=2 loops=6,617)

89. 675.444 1,482.208 ↓ 2.0 2 6,617

Hash Right Join (cost=8.46..14.18 rows=1 width=72) (actual time=0.140..0.224 rows=2 loops=6,617)

  • Hash Cond: (country_map_1.iso_country = ent_entity_address.iso_country)
90. 561.935 561.935 ↑ 1.0 270 6,611

Seq Scan on country_map country_map_1 (cost=0.00..4.70 rows=270 width=15) (actual time=0.002..0.085 rows=270 loops=6,611)

91. 19.851 244.829 ↓ 2.0 2 6,617

Hash (cost=8.45..8.45 rows=1 width=60) (actual time=0.037..0.037 rows=2 loops=6,617)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
92. 224.978 224.978 ↓ 2.0 2 6,617

Index Scan using ent_entity_address_factset_entity_id_idx on ent_entity_address (cost=0.43..8.45 rows=1 width=60) (actual time=0.028..0.034 rows=2 loops=6,617)

  • Index Cond: (factset_entity_id = own_ent_funds.factset_inst_entity_id)
93. 44.391 44.391 ↑ 1.0 1 14,797

Index Scan using region_map_pkey on region_map region_map_1 (cost=0.13..0.19 rows=1 width=76) (actual time=0.002..0.003 rows=1 loops=14,797)

  • Index Cond: (region_code = country_map_1.region_code)