Greeting to you all. I need help on how to load records of 300 million from staging table to production table. Currently, I am using Select into or Insert into production table. It takes me about 2 hours to load in Azure SQL database. I am think this is too much. I don't have any indexes in any of the tables. I am using SSMS and not SSIS.
Could you please help me how to load this table as fast as possible.
IF OBJECT_ID('tempdb..#DataToLoad') IS NOT NULL
DROP TABLE #DataToLoad
CREATE Table #DataToLoad
DataId int identity primary key,
Declare @Id int
Set @Id = 1
While @Id <= 300000000
Insert Into #DataToLoad values ('OrganisationName - ' + CAST(@Id as nvarchar(10)),
'DiagnosisCode - ' + CAST(@Id as nvarchar(10)) + ' ICD_10')
Set @Id = @Id + 1
Above is my test data and any help will be appreciated.
Thanking you in advance.