explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Nwc7

Settings
# exclusive inclusive rows x rows loops node
1. 210.612 3,542.265 ↑ 4.3 74,977 1

Merge Left Join (cost=97,396.39..100,299.12 rows=319,966 width=158) (actual time=2,508.224..3,542.265 rows=74,977 loops=1)

  • Merge Cond: ((msci_index_definitions.msci_index_code = msci_country_weights.msci_index_code) AND (msci_index_components.iso_country_symbol_next_day = msci_country_weights.iso_country_code))
  • Join Filter: (msci_index_definitions.msci_index_headers_id = msci_country_weights.msci_index_headers_id)
  • Filter: ((msci_country_weights.iso_country_code IS NOT NULL) OR (msci_index_definitions.iso_country_symbol = msci_index_components.iso_country_symbol))
  • Rows Removed by Filter: 407998
  • Buffers: shared hit=821, temp read=16165 written=16165
2. 2,850.005 3,313.373 ↓ 1.5 482,975 1

Sort (cost=96,020.70..96,820.61 rows=319,966 width=173) (actual time=2,491.778..3,313.373 rows=482,975 loops=1)

  • Sort Key: msci_index_definitions.msci_index_code, msci_index_components.iso_country_symbol_next_day
  • Sort Method: external merge Disk: 94600kB
  • Buffers: shared hit=522, temp read=16165 written=16165
3. 397.869 463.368 ↓ 1.5 482,975 1

Nested Loop (cost=0.57..39,421.71 rows=319,966 width=173) (actual time=0.381..463.368 rows=482,975 loops=1)

  • Join Filter: ((((msci_index_definitions.dm_flag = msci_index_components.dm_universe_flag) AND (msci_index_definitions.em_flag = msci_index_components.em_universe_flag)) OR (msci_index_definitions.iso_country_symbol = msci_index_components.iso_country_symbol)) AND ((msci_index_definitions.large_cap_flag = msci_index_components.family_large_flag) OR (msci_index_definitions.large_cap_flag = msci_index_components.family_large_flag_next_day) OR (msci_index_definitions.mid_cap_flag = msci_index_components.family_mid_flag) OR (msci_index_definitions.mid_cap_flag = msci_index_components.family_mid_flag_next_day)))
  • Rows Removed by Join Filter: 809541
  • Buffers: shared hit=522
4. 3.159 3.159 ↑ 1.0 4,156 1

Index Scan using msci_index_components_headers_id_idx on msci_index_components (cost=0.29..392.04 rows=4,156 width=105) (actual time=0.059..3.159 rows=4,156 loops=1)

  • Index Cond: (msci_index_headers_id = 401)
  • Buffers: shared hit=322
5. 59.160 62.340 ↑ 1.0 311 4,156

Materialize (cost=0.29..254.97 rows=311 width=76) (actual time=0.000..0.015 rows=311 loops=4,156)

  • Buffers: shared hit=200
6. 3.180 3.180 ↑ 1.0 311 1

Index Scan using msci_index_definitions_headers_id_idx on msci_index_definitions (cost=0.29..253.41 rows=311 width=76) (actual time=0.063..3.180 rows=311 loops=1)

  • Index Cond: (msci_index_headers_id = 401)
  • Filter: (real_time_ticker IS NOT NULL)
  • Rows Removed by Filter: 2892
  • Buffers: shared hit=200
7. 14.793 18.280 ↓ 6.1 75,472 1

Sort (cost=1,375.69..1,406.38 rows=12,274 width=15) (actual time=14.648..18.280 rows=75,472 loops=1)

  • Sort Key: msci_country_weights.msci_index_code, msci_country_weights.iso_country_code
  • Sort Method: quicksort Memory: 1334kB
  • Buffers: shared hit=299
8. 3.487 3.487 ↑ 1.0 12,155 1

Index Scan using msci_country_weights_headers_id_idx on msci_country_weights (cost=0.29..542.09 rows=12,274 width=15) (actual time=0.068..3.487 rows=12,155 loops=1)

  • Index Cond: (msci_index_headers_id = 401)
  • Buffers: shared hit=299
Planning time : 2.227 ms
Execution time : 3,562.197 ms