explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uM2O : new

Settings
# exclusive inclusive rows x rows loops node
1. 34.433 9,732.800 ↓ 10.3 6,617 1

Nested Loop Left Join (cost=403,170.16..438,892.23 rows=643 width=640) (actual time=7,985.333..9,732.800 rows=6,617 loops=1)

2. 5.802 8,454.371 ↓ 10.3 6,617 1

Hash Left Join (cost=403,169.59..422,302.32 rows=643 width=520) (actual time=7,985.050..8,454.371 rows=6,617 loops=1)

  • Hash Cond: (own_ent_funds.fund_type = fund_type_map.fund_type_code)
3. 5.897 8,448.549 ↓ 10.3 6,617 1

Hash Left Join (cost=403,168.16..422,292.05 rows=643 width=456) (actual time=7,985.023..8,448.549 rows=6,617 loops=1)

  • Hash Cond: (ent_entity_metro_areas.metro_id = metro_map.metro_code)
4. 12.034 8,442.530 ↓ 10.3 6,617 1

Nested Loop Left Join (cost=403,162.00..422,277.05 rows=643 width=440) (actual time=7,984.892..8,442.530 rows=6,617 loops=1)

5. 5.655 8,370.943 ↓ 10.3 6,617 1

Hash Left Join (cost=403,161.57..421,973.13 rows=643 width=445) (actual time=7,984.874..8,370.943 rows=6,617 loops=1)

  • Hash Cond: (country_map.region_code = region_map.region_code)
6. 6.525 8,365.277 ↓ 10.3 6,617 1

Hash Left Join (cost=403,160.39..421,963.11 rows=643 width=379) (actual time=7,984.857..8,365.277 rows=6,617 loops=1)

  • Hash Cond: (fund_entity.iso_country = country_map.iso_country)
7. 7.380 8,358.567 ↓ 10.3 6,617 1

Nested Loop Left Join (cost=403,152.31..421,946.20 rows=643 width=367) (actual time=7,984.657..8,358.567 rows=6,617 loops=1)

8. 7.277 8,291.634 ↓ 10.3 6,617 1

Nested Loop Left Join (cost=403,151.90..417,396.06 rows=643 width=326) (actual time=7,984.642..8,291.634 rows=6,617 loops=1)

9. 7.927 8,224.804 ↓ 10.3 6,617 1

Nested Loop Left Join (cost=403,151.47..415,997.84 rows=643 width=307) (actual time=7,984.626..8,224.804 rows=6,617 loops=1)

10. 9.186 8,157.324 ↓ 10.3 6,617 1

Nested Loop Left Join (cost=403,151.03..413,299.12 rows=643 width=276) (actual time=7,984.612..8,157.324 rows=6,617 loops=1)

11. 8.960 8,081.968 ↓ 10.3 6,617 1

Hash Left Join (cost=403,150.60..410,600.41 rows=643 width=239) (actual time=7,984.585..8,081.968 rows=6,617 loops=1)

  • Hash Cond: (current_factset_fund_holdings.factset_fund_id = q4_fund_values.factset_fund_id)
12. 11.844 8,029.530 ↓ 10.3 6,617 1

Nested Loop Left Join (cost=400,794.35..408,235.31 rows=643 width=223) (actual time=7,941.023..8,029.530 rows=6,617 loops=1)

13. 9.735 7,964.750 ↓ 10.3 6,617 1

Hash Right Join (cost=400,793.93..403,794.75 rows=643 width=192) (actual time=7,940.991..7,964.750 rows=6,617 loops=1)

  • Hash Cond: ((previous_factset_fund_holdings.fsym_id = current_factset_fund_holdings.fsym_id) AND (previous_factset_fund_holdings.factset_fund_id = current_factset_fund_holdings.factset_fund_id))
14.          

CTE report_dates

15. 293.157 293.157 ↓ 1.1 541,443 1

Seq Scan on q4_fund_dates (cost=0.00..33,672.26 rows=479,176 width=13) (actual time=0.013..293.157 rows=541,443 loops=1)

  • Filter: ((report_date >= '2017-06-10'::date) AND (report_date <= '2019-06-10'::date))
  • Rows Removed by Filter: 1088219
16.          

CTE factset_fund_holdings

17. 79.230 4,427.891 ↑ 1.7 77,625 1

WindowAgg (cost=176,200.39..180,626.52 rows=128,650 width=46) (actual time=4,192.758..4,427.891 rows=77,625 loops=1)

18. 97.153 4,348.661 ↑ 1.7 77,625 1

Merge Left Join (cost=176,200.39..178,375.14 rows=128,650 width=54) (actual time=4,192.751..4,348.661 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. 144.466 3,463.004 ↑ 1.7 77,625 1

Sort (cost=102,248.58..102,570.20 rows=128,650 width=46) (actual time=3,441.027..3,463.004 rows=77,625 loops=1)

  • Sort Key: own_fund_detail.factset_fund_id, ad.report_date DESC
  • Sort Method: quicksort Memory: 13973kB
20. 199.932 3,318.538 ↑ 1.7 77,625 1

Merge Join (cost=89,111.81..91,330.63 rows=128,650 width=46) (actual time=2,846.429..3,318.538 rows=77,625 loops=1)

  • Merge Cond: (ad.factset_fund_id = own_fund_detail.factset_fund_id)
21. 1,495.828 2,746.646 ↓ 395.2 540,695 1

Sort (cost=17,012.73..17,016.15 rows=1,368 width=58) (actual time=2,562.010..2,746.646 rows=540,695 loops=1)

  • Sort Key: ad.factset_fund_id
  • Sort Method: external merge Disk: 23256kB
22. 228.472 1,250.818 ↓ 395.2 540,695 1

Nested Loop (cost=4,917.71..16,941.47 rows=1,368 width=58) (actual time=64.483..1,250.818 rows=540,695 loops=1)

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

  • Index Cond: (fsym_id = 'BHM9TN-S'::bpchar)
  • Heap Fetches: 1
24. 312.979 1,022.327 ↓ 395.2 540,695 1

Hash Join (cost=4,917.29..16,919.35 rows=1,368 width=49) (actual time=64.465..1,022.327 rows=540,695 loops=1)

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

CTE Scan on report_dates ad (cost=0.00..11,979.40 rows=2,396 width=40) (actual time=0.017..645.051 rows=541,443 loops=1)

  • Filter: ((report_date >= '2017-06-10'::date) AND (report_date <= '2019-06-10'::date))
26. 23.948 64.297 ↓ 1.0 68,140 1

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

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

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

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

29. 35.081 353.571 ↑ 2.4 7,979 1

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

30. 234.918 318.490 ↓ 7.6 143,529 1

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

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

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

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

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

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

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

35. 74.577 493.274 ↓ 7.6 143,529 1

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

36. 348.105 418.697 ↓ 7.6 143,529 1

Sort (cost=72,099.09..72,146.13 rows=18,816 width=54) (actual time=378.034..418.697 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.545 70.592 ↓ 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.207..70.592 rows=143,529 loops=1)

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

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

CTE factset_prev_fund_holdings

40. 62.893 3,413.741 ↑ 2.0 64,435 1

WindowAgg (cost=176,200.39..180,626.52 rows=128,650 width=46) (actual time=3,211.016..3,413.741 rows=64,435 loops=1)

41. 85.819 3,350.848 ↑ 2.0 64,435 1

Merge Left Join (cost=176,200.39..178,375.14 rows=128,650 width=54) (actual time=3,211.006..3,350.848 rows=64,435 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. 123.023 2,482.623 ↑ 2.0 64,435 1

Sort (cost=102,248.58..102,570.20 rows=128,650 width=46) (actual time=2,465.082..2,482.623 rows=64,435 loops=1)

  • Sort Key: own_fund_detail_2.factset_fund_id, ad_1.report_date DESC
  • Sort Method: quicksort Memory: 10592kB
43. 179.146 2,359.600 ↑ 2.0 64,435 1

Merge Join (cost=89,111.81..91,330.63 rows=128,650 width=46) (actual time=1,978.238..2,359.600 rows=64,435 loops=1)

  • Merge Cond: (ad_1.factset_fund_id = own_fund_detail_2.factset_fund_id)
44. 1,140.074 1,803.660 ↓ 325.1 444,692 1

Sort (cost=17,012.73..17,016.15 rows=1,368 width=58) (actual time=1,691.580..1,803.660 rows=444,692 loops=1)

  • Sort Key: ad_1.factset_fund_id
  • Sort Method: quicksort Memory: 46557kB
45. 183.536 663.586 ↓ 325.1 444,692 1

Nested Loop (cost=4,917.71..16,941.47 rows=1,368 width=58) (actual time=63.537..663.586 rows=444,692 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.023..0.027 rows=1 loops=1)

  • Index Cond: (fsym_id = 'BHM9TN-S'::bpchar)
  • Heap Fetches: 1
47. 252.064 480.023 ↓ 325.1 444,692 1

Hash Join (cost=4,917.29..16,919.35 rows=1,368 width=49) (actual time=63.510..480.023 rows=444,692 loops=1)

  • Hash Cond: (ad_1.factset_fund_id = ent_1.factset_fund_id)
48. 164.608 164.608 ↓ 185.9 445,366 1

CTE Scan on report_dates ad_1 (cost=0.00..11,979.40 rows=2,396 width=40) (actual time=0.006..164.608 rows=445,366 loops=1)

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

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

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

  • Filter: (active_flag = 1)
  • Rows Removed by Filter: 51192
51. 16.182 376.794 ↓ 3.5 65,890 1

Materialize (cost=72,099.09..72,428.28 rows=18,809 width=42) (actual time=286.650..376.794 rows=65,890 loops=1)

52. 36.969 360.612 ↑ 2.4 7,979 1

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

53. 239.725 323.643 ↓ 7.6 143,529 1

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

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

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

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

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

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

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

58. 73.745 490.552 ↓ 7.6 143,529 1

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

59. 345.724 416.807 ↓ 7.6 143,529 1

Sort (cost=72,099.09..72,146.13 rows=18,816 width=54) (actual time=379.253..416.807 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. 54.312 71.083 ↓ 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=18.898..71.083 rows=143,529 loops=1)

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

  • Index Cond: (fsym_id = 'BHM9TN-S'::bpchar)
62. 14.046 14.046 ↓ 9.9 6,338 1

CTE Scan on factset_fund_holdings previous_factset_fund_holdings (cost=0.00..2,894.62 rows=643 width=92) (actual time=0.010..14.046 rows=6,338 loops=1)

  • Filter: (pos = 2)
  • Rows Removed by Filter: 71287
63. 2.565 7,940.969 ↓ 10.3 6,617 1

Hash (cost=5,858.98..5,858.98 rows=643 width=108) (actual time=7,940.969..7,940.969 rows=6,617 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 632kB
64. 9.823 7,938.404 ↓ 10.3 6,617 1

Merge Left Join (cost=5,849.23..5,858.98 rows=643 width=108) (actual time=7,925.500..7,938.404 rows=6,617 loops=1)

  • Merge Cond: ((current_factset_fund_holdings.factset_fund_id = factset_prev_fund_holdings.factset_fund_id) AND (current_factset_fund_holdings.fsym_id = factset_prev_fund_holdings.fsym_id))
65. 5.700 4,475.080 ↓ 10.3 6,617 1

Sort (cost=2,924.62..2,926.22 rows=643 width=92) (actual time=4,473.516..4,475.080 rows=6,617 loops=1)

  • Sort Key: current_factset_fund_holdings.factset_fund_id, current_factset_fund_holdings.fsym_id
  • Sort Method: quicksort Memory: 709kB
66. 4,469.380 4,469.380 ↓ 10.3 6,617 1

CTE Scan on factset_fund_holdings current_factset_fund_holdings (cost=0.00..2,894.62 rows=643 width=92) (actual time=4,192.763..4,469.380 rows=6,617 loops=1)

  • Filter: (pos = 1)
  • Rows Removed by Filter: 71008
67. 5.675 3,453.501 ↓ 10.1 6,524 1

Sort (cost=2,924.62..2,926.22 rows=643 width=88) (actual time=3,451.980..3,453.501 rows=6,524 loops=1)

  • Sort Key: factset_prev_fund_holdings.factset_fund_id, factset_prev_fund_holdings.fsym_id
  • Sort Method: quicksort Memory: 702kB
68. 3,447.826 3,447.826 ↓ 10.1 6,524 1

CTE Scan on factset_prev_fund_holdings (cost=0.00..2,894.62 rows=643 width=88) (actual time=3,211.021..3,447.826 rows=6,524 loops=1)

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

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

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

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

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

72. 66.170 66.170 ↑ 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.010..0.010 rows=1 loops=6,617)

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

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

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

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

  • Index Cond: (factset_fund_id = current_factset_fund_holdings.factset_fund_id)
76. 0.101 0.185 ↑ 1.0 270 1

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

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

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

78. 0.006 0.011 ↑ 1.0 8 1

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

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

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

80. 59.553 59.553 ↑ 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.009..0.009 rows=1 loops=6,617)

  • Index Cond: (factset_entity_id = inst_entity.factset_entity_id)
81. 0.066 0.122 ↑ 1.0 185 1

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

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

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

83. 0.012 0.020 ↑ 1.0 19 1

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

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

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

85. 52.936 52.936 ↑ 2.0 1 6,617

Index Scan using own_sec_prices_pkey on own_sec_prices prices (cost=0.57..11.35 rows=2 width=45) (actual time=0.008..0.008 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. 178.659 1,191.060 ↑ 1.0 1 6,617

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

88. 23.342 1,012.401 ↓ 2.0 2 6,617

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

89. 476.778 959.465 ↓ 2.0 2 6,617

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

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

91. 13.234 92.638 ↓ 2.0 2 6,617

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
92. 79.404 79.404 ↓ 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.010..0.012 rows=2 loops=6,617)

  • Index Cond: (factset_entity_id = own_ent_funds.factset_inst_entity_id)
93. 29.594 29.594 ↑ 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.001..0.002 rows=1 loops=14,797)

  • Index Cond: (region_code = country_map_1.region_code)
Planning time : 4.028 ms
Execution time : 9,743.873 ms