Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- USE ParadisePapers
- GO
- if not exists(select 1
- from sys.indexes
- where sys.indexes.object_id = object_id('dbo.ParadisePapersAddresses') and sys.indexes.name = 'IX_ParadisePapersAddresses_n_country_codes_n_node_id')
- BEGIN
- CREATE NONCLUSTERED INDEX IX_ParadisePapersAddresses_n_country_codes_n_node_id
- ON ParadisePapersAddresses(n_country_codes, n_node_id)
- END
- if not exists(select 1
- from sys.indexes
- where sys.indexes.object_id = object_id('dbo.ParadisePapersEdges') and sys.indexes.name = 'IX_ParadisePapersEdges_node_1_node_2')
- BEGIN
- CREATE NONCLUSTERED INDEX IX_ParadisePapersEdges_node_1_node_2
- ON ParadisePapersEdges(node_1, node_2)
- END
- if not exists(select 1
- from sys.indexes
- where sys.indexes.object_id = object_id('dbo.ParadisePapersEntities') and sys.indexes.name = 'IX_ParadisePapersEntities_n_node_id_n_jurisdiction')
- BEGIN
- CREATE NONCLUSTERED INDEX IX_ParadisePapersEntities_n_node_id_n_jurisdiction
- ON ParadisePapersEntities(n_node_id, n_jurisdiction)
- END
- if not exists(select 1
- from sys.indexes
- where sys.indexes.object_id = object_id('dbo.ParadisePapersIntermediaries') and sys.indexes.name = 'IX_ParadisePapersIntermediaries_n_country_codes_n_node_id')
- BEGIN
- CREATE NONCLUSTERED INDEX IX_ParadisePapersIntermediaries_n_country_codes_n_node_id
- ON ParadisePapersIntermediaries(n_country_codes, n_node_id)
- END
- if not exists(select 1
- from sys.indexes
- where sys.indexes.object_id = object_id('dbo.ParadisePapersOfficers') and sys.indexes.name = 'IX_ParadisePapersOfficers_n_country_codes_n_node_id')
- BEGIN
- CREATE NONCLUSTERED INDEX IX_ParadisePapersOfficers_n_country_codes_n_node_id
- ON ParadisePapersOfficers(n_country_codes, n_node_id)
- END
- if not exists(select 1
- from sys.indexes
- where sys.indexes.object_id = object_id('dbo.ParadisePapersOthers') and sys.indexes.name = 'IX_ParadisePapersOthers_n_country_codes_n_node_id')
- BEGIN
- CREATE NONCLUSTERED INDEX IX_ParadisePapersOthers_n_country_codes_n_node_id
- ON ParadisePapersOthers(n_country_codes, n_node_id)
- END
- if not exists(select 1
- from sys.indexes
- where sys.indexes.object_id = object_id('dbo.CountriesInfo') and sys.indexes.name = 'IX_PCountriesInfo_alpha3')
- BEGIN
- CREATE NONCLUSTERED INDEX IX_PCountriesInfo_alpha3
- ON CountriesInfo([alpha-3])
- END
Add Comment
Please, Sign In to add comment