explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZDa

Settings
# exclusive inclusive rows x rows loops node
1. 59.066 13,060.249 ↓ 8.0 6,617 1

Nested Loop Left Join (cost=431,837.75..473,281.48 rows=824 width=640) (actual time=10,189.319..13,060.249 rows=6,617 loops=1)

2. 9.630 10,930.062 ↓ 8.0 6,617 1

Hash Left Join (cost=431,837.18..452,037.92 rows=824 width=520) (actual time=10,188.882..10,930.062 rows=6,617 loops=1)

  • Hash Cond: (own_ent_funds.fund_type = fund_type_map.fund_type_code)
3. 9.918 10,920.403 ↓ 8.0 6,617 1

Hash Left Join (cost=431,835.76..452,025.16 rows=824 width=456) (actual time=10,188.845..10,920.403 rows=6,617 loops=1)

  • Hash Cond: (ent_entity_metro_areas.metro_id = metro_map.metro_code)
4. 15.126 10,910.274 ↓ 8.0 6,617 1

Nested Loop Left Join (cost=431,829.59..452,007.67 rows=824 width=440) (actual time=10,188.619..10,910.274 rows=6,617 loops=1)

5. 8.958 10,802.510 ↓ 8.0 6,617 1

Hash Left Join (cost=431,829.16..451,618.20 rows=824 width=445) (actual time=10,188.593..10,802.510 rows=6,617 loops=1)

  • Hash Cond: (country_map.region_code = region_map.region_code)
6. 10.282 10,793.535 ↓ 8.0 6,617 1

Hash Left Join (cost=431,827.98..451,605.69 rows=824 width=379) (actual time=10,188.565..10,793.535 rows=6,617 loops=1)

  • Hash Cond: (fund_entity.iso_country = country_map.iso_country)
7. 16.236 10,782.931 ↓ 8.0 6,617 1

Nested Loop Left Join (cost=431,819.91..451,586.29 rows=824 width=367) (actual time=10,188.226..10,782.931 rows=6,617 loops=1)

8. 10.744 10,680.674 ↓ 8.0 6,617 1

Nested Loop Left Join (cost=431,819.49..445,987.61 rows=824 width=326) (actual time=10,188.204..10,680.674 rows=6,617 loops=1)

9. 11.668 10,577.292 ↓ 8.0 6,617 1

Nested Loop Left Join (cost=431,819.06..444,195.80 rows=824 width=307) (actual time=10,188.181..10,577.292 rows=6,617 loops=1)

10. 13.004 10,472.986 ↓ 8.0 6,617 1

Nested Loop Left Join (cost=431,818.63..440,737.41 rows=824 width=276) (actual time=10,188.160..10,472.986 rows=6,617 loops=1)

11. 13.128 10,360.727 ↓ 8.0 6,617 1

Hash Left Join (cost=431,818.20..437,279.03 rows=824 width=239) (actual time=10,188.129..10,360.727 rows=6,617 loops=1)

  • Hash Cond: (current_factset_fund_holdings.factset_fund_id = q4_fund_values.factset_fund_id)
12. 15.543 10,269.755 ↓ 8.0 6,617 1

Nested Loop Left Join (cost=429,461.94..434,911.44 rows=824 width=223) (actual time=10,110.196..10,269.755 rows=6,617 loops=1)

13. 25.222 10,168.191 ↓ 8.0 6,617 1

Merge Left Join (cost=429,461.52..429,484.52 rows=824 width=192) (actual time=10,110.164..10,168.191 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. 437.378 437.378 ↓ 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.019..437.378 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. 76.018 5,373.378 ↑ 2.1 77,625 1

WindowAgg (cost=186,596.56..192,269.63 rows=164,893 width=46) (actual time=5,142.994..5,373.378 rows=77,625 loops=1)

18. 95.269 5,297.360 ↑ 2.1 77,625 1

Merge Left Join (cost=186,596.56..189,384.00 rows=164,893 width=54) (actual time=5,142.984..5,297.360 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. 149.494 4,420.792 ↑ 2.1 77,625 1

Sort (cost=112,644.75..113,056.98 rows=164,893 width=46) (actual time=4,399.298..4,420.792 rows=77,625 loops=1)

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

Merge Join (cost=95,591.96..98,355.81 rows=164,893 width=46) (actual time=3,673.791..4,271.298 rows=77,625 loops=1)

  • Merge Cond: (ad.factset_fund_id = own_fund_detail.factset_fund_id)
21. 1,811.849 3,633.964 ↓ 308.4 540,695 1

Sort (cost=23,492.87..23,497.25 rows=1,753 width=58) (actual time=3,390.567..3,633.964 rows=540,695 loops=1)

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

Nested Loop (cost=4,917.71..23,398.42 rows=1,753 width=58) (actual time=142.723..1,822.115 rows=540,695 loops=1)

23. 0.021 0.021 ↑ 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.018..0.021 rows=1 loops=1)

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

Hash Join (cost=4,917.29..23,372.45 rows=1,753 width=49) (actual time=142.702..1,534.943 rows=540,695 loops=1)

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

CTE Scan on report_dates ad (cost=0.00..18,426.12 rows=3,071 width=40) (actual time=0.034..998.966 rows=541,443 loops=1)

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

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

  • Buckets: 131072 Batches: 1 Memory Usage: 3753kB
27. 88.541 88.541 ↓ 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.008..88.541 rows=68,140 loops=1)

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

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

29. 43.000 369.350 ↑ 2.4 7,979 1

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

30. 243.521 326.350 ↓ 7.6 143,529 1

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

  • Sort Key: own_fund_detail.factset_fund_id
  • Sort Method: quicksort Memory: 17358kB
31. 65.775 82.829 ↓ 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=19.171..82.829 rows=143,529 loops=1)

  • Recheck Cond: (fsym_id = 'BHM9TN-S'::bpchar)
  • Heap Blocks: exact=13494
32. 17.054 17.054 ↓ 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=17.054..17.054 rows=144,981 loops=1)

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

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

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

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

35. 74.297 487.620 ↓ 7.6 143,529 1

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

36. 342.790 413.323 ↓ 7.6 143,529 1

Sort (cost=72,099.09..72,146.13 rows=18,816 width=54) (actual time=374.119..413.323 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. 53.496 70.533 ↓ 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=19.151..70.533 rows=143,529 loops=1)

  • Recheck Cond: (fsym_id = 'BHM9TN-S'::bpchar)
  • Heap Blocks: exact=13494
38. 17.037 17.037 ↓ 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=17.037..17.037 rows=144,981 loops=1)

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

CTE factset_prev_fund_holdings

40. 138.141 4,593.246 ↑ 2.0 83,931 1

WindowAgg (cost=186,596.56..192,269.63 rows=164,893 width=46) (actual time=4,188.519..4,593.246 rows=83,931 loops=1)

41. 164.840 4,455.105 ↑ 2.0 83,931 1

Merge Left Join (cost=186,596.56..189,384.00 rows=164,893 width=54) (actual time=4,188.513..4,455.105 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. 236.307 2,946.103 ↑ 2.0 83,931 1

Sort (cost=112,644.75..113,056.98 rows=164,893 width=46) (actual time=2,906.578..2,946.103 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. 256.699 2,709.796 ↑ 2.0 83,931 1

Merge Join (cost=95,591.96..98,355.81 rows=164,893 width=46) (actual time=2,121.128..2,709.796 rows=83,931 loops=1)

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

Sort (cost=23,492.87..23,497.25 rows=1,753 width=58) (actual time=1,784.786..2,011.288 rows=576,752 loops=1)

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

Nested Loop (cost=4,917.71..23,398.42 rows=1,753 width=58) (actual time=105.171..1,083.020 rows=576,752 loops=1)

46. 0.020 0.020 ↑ 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.018..0.020 rows=1 loops=1)

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

Hash Join (cost=4,917.29..23,372.45 rows=1,753 width=49) (actual time=105.149..796.046 rows=576,752 loops=1)

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

CTE Scan on report_dates ad_1 (cost=0.00..18,426.12 rows=3,071 width=40) (actual time=0.007..299.482 rows=577,648 loops=1)

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

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

  • Buckets: 131072 Batches: 1 Memory Usage: 3753kB
50. 65.396 65.396 ↓ 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..65.396 rows=68,140 loops=1)

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

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

52. 41.019 418.407 ↑ 2.4 7,979 1

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

53. 261.772 377.388 ↓ 7.6 143,529 1

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

  • Sort Key: own_fund_detail_2.factset_fund_id
  • Sort Method: quicksort Memory: 17358kB
54. 80.643 115.616 ↓ 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=37.688..115.616 rows=143,529 loops=1)

  • Recheck Cond: (fsym_id = 'BHM9TN-S'::bpchar)
  • Heap Blocks: exact=13494
55. 34.973 34.973 ↓ 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.972..34.973 rows=144,981 loops=1)

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

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

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

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

58. 130.825 819.259 ↓ 7.6 143,529 1

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

59. 586.179 688.434 ↓ 7.6 143,529 1

Sort (cost=72,099.09..72,146.13 rows=18,816 width=54) (actual time=619.463..688.434 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. 78.299 102.255 ↓ 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=26.855..102.255 rows=143,529 loops=1)

  • Recheck Cond: (fsym_id = 'BHM9TN-S'::bpchar)
  • Heap Blocks: exact=13494
61. 23.956 23.956 ↓ 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=23.956..23.956 rows=144,981 loops=1)

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

Merge Left Join (cost=7,500.00..7,512.53 rows=824 width=112) (actual time=5,433.193..5,461.660 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. 7.720 5,422.345 ↓ 8.0 6,617 1

Sort (cost=3,750.00..3,752.06 rows=824 width=92) (actual time=5,418.863..5,422.345 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. 5,414.625 5,414.625 ↓ 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=5,142.999..5,414.625 rows=6,617 loops=1)

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

Sort (cost=3,750.00..3,752.06 rows=824 width=92) (actual time=14.326..17.979 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.155 10.155 ↓ 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.008..10.155 rows=6,338 loops=1)

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

Sort (cost=3,750.00..3,752.06 rows=824 width=88) (actual time=4,676.963..4,681.309 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,668.283 4,668.283 ↓ 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,188.523..4,668.283 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.012..0.013 rows=1 loops=6,617)

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

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

  • Buckets: 65536 Batches: 1 Memory Usage: 3926kB
71. 37.298 37.298 ↑ 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..37.298 rows=65,078 loops=1)

72. 99.255 99.255 ↑ 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.014..0.015 rows=1 loops=6,617)

  • Index Cond: (factset_entity_id = own_ent_funds.factset_inst_entity_id)
73. 92.638 92.638 ↑ 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.013..0.014 rows=1 loops=6,617)

  • Index Cond: (factset_entity_id = own_ent_funds.factset_fund_id)
74. 92.638 92.638 ↑ 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.013..0.014 rows=1 loops=6,617)

  • Index Cond: (factset_entity_id = own_ent_funds.factset_fund_id)
75. 86.021 86.021 ↑ 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.013..0.013 rows=1 loops=6,617)

  • Index Cond: (factset_fund_id = current_factset_fund_holdings.factset_fund_id)
76. 0.177 0.322 ↑ 1.0 270 1

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

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

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

78. 0.008 0.017 ↑ 1.0 8 1

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

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

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

80. 92.638 92.638 ↑ 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.013..0.014 rows=1 loops=6,617)

  • Index Cond: (factset_entity_id = inst_entity.factset_entity_id)
81. 0.120 0.211 ↑ 1.0 185 1

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

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

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

83. 0.015 0.029 ↑ 1.0 19 1

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

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

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

85. 92.638 92.638 ↑ 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.013..0.014 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. 310.999 1,978.483 ↑ 1.0 1 6,617

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

88. 41.630 1,667.484 ↓ 2.0 2 6,617

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

89. 788.017 1,581.463 ↓ 2.0 2 6,617

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

  • Hash Cond: (country_map_1.iso_country = ent_entity_address.iso_country)
90. 654.489 654.489 ↑ 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.099 rows=270 loops=6,611)

91. 26.468 138.957 ↓ 2.0 2 6,617

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
92. 112.489 112.489 ↓ 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.014..0.017 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)
Planning time : 14.798 ms
Execution time : 13,083.100 ms