explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4xKa

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

Nested Loop Left Join (cost=425,695.71..467,139.44 rows=824 width=640) (actual time=10,086.209..13,258.308 rows=6,617 loops=1)

2. 10.368 10,900.003 ↓ 8.0 6,617 1

Hash Left Join (cost=425,695.14..445,895.88 rows=824 width=520) (actual time=10,085.795..10,900.003 rows=6,617 loops=1)

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

Hash Left Join (cost=425,693.72..445,883.12 rows=824 width=456) (actual time=10,085.757..10,889.606 rows=6,617 loops=1)

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

Nested Loop Left Join (cost=425,687.55..445,865.63 rows=824 width=440) (actual time=10,085.535..10,879.104 rows=6,617 loops=1)

5. 13.929 10,758.392 ↓ 8.0 6,617 1

Hash Left Join (cost=425,687.12..445,476.16 rows=824 width=445) (actual time=10,085.513..10,758.392 rows=6,617 loops=1)

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

Hash Left Join (cost=425,685.94..445,463.65 rows=824 width=379) (actual time=10,085.483..10,744.448 rows=6,617 loops=1)

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

Nested Loop Left Join (cost=425,677.87..445,444.25 rows=824 width=367) (actual time=10,085.156..10,733.586 rows=6,617 loops=1)

8. 17.508 10,631.199 ↓ 8.0 6,617 1

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

9. 11.678 10,507.819 ↓ 8.0 6,617 1

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

10. 13.700 10,396.886 ↓ 8.0 6,617 1

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

11. 13.080 10,277.314 ↓ 8.0 6,617 1

Hash Left Join (cost=425,676.16..431,136.99 rows=824 width=239) (actual time=10,085.064..10,277.314 rows=6,617 loops=1)

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

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

13. 26.700 10,071.431 ↓ 8.0 6,617 1

Merge Left Join (cost=423,319.48..423,342.48 rows=824 width=192) (actual time=10,007.285..10,071.431 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. 343.033 343.033 ↓ 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.013..343.033 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. 114.251 4,785.990 ↑ 2.1 77,625 1

WindowAgg (cost=183,525.54..189,198.61 rows=164,893 width=46) (actual time=4,441.594..4,785.990 rows=77,625 loops=1)

18. 142.145 4,671.739 ↑ 2.1 77,625 1

Merge Left Join (cost=183,525.54..186,312.98 rows=164,893 width=54) (actual time=4,441.585..4,671.739 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. 154.652 3,619.284 ↑ 2.1 77,625 1

Sort (cost=109,573.73..109,985.96 rows=164,893 width=46) (actual time=3,586.420..3,619.284 rows=77,625 loops=1)

  • Sort Key: own_fund_detail.factset_fund_id, ad.report_date DESC
  • Sort Method: quicksort Memory: 13973kB
20. 199.983 3,464.632 ↑ 2.1 77,625 1

Merge Join (cost=92,520.94..95,284.79 rows=164,893 width=46) (actual time=2,993.167..3,464.632 rows=77,625 loops=1)

  • Merge Cond: (ad.factset_fund_id = own_fund_detail.factset_fund_id)
21. 1,525.602 2,895.336 ↓ 308.4 540,695 1

Sort (cost=20,421.85..20,426.23 rows=1,753 width=58) (actual time=2,711.213..2,895.336 rows=540,695 loops=1)

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

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

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

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

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

  • Hash Cond: (ad.factset_fund_id = ent.factset_fund_id)
25. 759.431 759.431 ↓ 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.020..759.431 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. 23.298 64.469 ↓ 1.0 68,140 1

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

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

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

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

29. 35.514 351.214 ↑ 2.4 7,979 1

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

30. 233.266 315.700 ↓ 7.6 143,529 1

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

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

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

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

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

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

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

35. 87.686 579.425 ↓ 7.6 143,529 1

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

36. 415.200 491.739 ↓ 7.6 143,529 1

Sort (cost=72,099.09..72,146.13 rows=18,816 width=54) (actual time=446.755..491.739 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. 59.341 76.539 ↓ 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.343..76.539 rows=143,529 loops=1)

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

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

CTE factset_prev_fund_holdings

40. 163.883 5,019.856 ↑ 2.0 83,931 1

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

41. 205.391 4,855.973 ↑ 2.0 83,931 1

Merge Left Join (cost=183,525.54..186,312.98 rows=164,893 width=54) (actual time=4,528.761..4,855.973 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. 213.006 3,453.092 ↑ 2.0 83,931 1

Sort (cost=109,573.73..109,985.96 rows=164,893 width=46) (actual time=3,406.784..3,453.092 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. 288.545 3,240.086 ↑ 2.0 83,931 1

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

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

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

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

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

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

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

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

  • Hash Cond: (ad_1.factset_fund_id = ent_1.factset_fund_id)
48. 276.944 276.944 ↓ 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.005..276.944 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. 39.728 112.077 ↓ 1.0 68,140 1

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

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

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

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

52. 51.082 678.782 ↑ 2.4 7,979 1

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

53. 426.258 627.700 ↓ 7.6 143,529 1

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

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

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

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

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

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

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

58. 115.394 649.285 ↓ 7.6 143,529 1

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

59. 442.720 533.891 ↓ 7.6 143,529 1

Sort (cost=72,099.09..72,146.13 rows=18,816 width=54) (actual time=475.721..533.891 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. 70.217 91.171 ↓ 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=23.252..91.171 rows=143,529 loops=1)

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

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

Merge Left Join (cost=7,500.00..7,512.53 rows=824 width=112) (actual time=4,886.818..4,919.592 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. 13.575 4,862.072 ↓ 8.0 6,617 1

Sort (cost=3,750.00..3,752.06 rows=824 width=92) (actual time=4,856.196..4,862.072 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. 4,848.497 4,848.497 ↓ 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=4,441.599..4,848.497 rows=6,617 loops=1)

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

Sort (cost=3,750.00..3,752.06 rows=824 width=92) (actual time=30.616..34.180 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. 22.443 22.443 ↓ 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.009..22.443 rows=6,338 loops=1)

  • Filter: (pos = 2)
  • Rows Removed by Filter: 71287
67. 14.229 5,125.139 ↓ 8.0 6,562 1

Sort (cost=3,750.00..3,752.06 rows=824 width=88) (actual time=5,120.462..5,125.139 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. 5,110.910 5,110.910 ↓ 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,528.780..5,110.910 rows=6,562 loops=1)

  • Filter: (pos = 1)
  • Rows Removed by Filter: 77369
69. 99.255 99.255 ↑ 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.014..0.015 rows=1 loops=6,617)

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

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

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

72. 105.872 105.872 ↑ 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.015..0.016 rows=1 loops=6,617)

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

  • Index Cond: (factset_entity_id = own_ent_funds.factset_fund_id)
74. 105.872 105.872 ↑ 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.015..0.016 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.012..0.013 rows=1 loops=6,617)

  • Index Cond: (factset_fund_id = current_factset_fund_holdings.factset_fund_id)
76. 0.169 0.314 ↑ 1.0 270 1

Hash (cost=4.70..4.70 rows=270 width=15) (actual time=0.314..0.314 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.007..0.145 rows=270 loops=1)

78. 0.006 0.015 ↑ 1.0 8 1

Hash (cost=1.08..1.08 rows=8 width=76) (actual time=0.015..0.015 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.004..0.009 rows=8 loops=1)

80. 105.872 105.872 ↑ 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.015..0.016 rows=1 loops=6,617)

  • Index Cond: (factset_entity_id = inst_entity.factset_entity_id)
81. 0.117 0.209 ↑ 1.0 185 1

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

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

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

83. 0.016 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.013 0.013 ↑ 1.0 19 1

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

85. 99.255 99.255 ↑ 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.014..0.015 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. 330.850 2,196.844 ↑ 1.0 1 6,617

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

88. 54.864 1,865.994 ↓ 2.0 2 6,617

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

89. 880.727 1,766.739 ↓ 2.0 2 6,617

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

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

91. 26.468 152.191 ↓ 2.0 2 6,617

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
92. 125.723 125.723 ↓ 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.016..0.019 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.003..0.003 rows=1 loops=14,797)

  • Index Cond: (region_code = country_map_1.region_code)
Planning time : 3.819 ms
Execution time : 13,432.215 ms