Hi XXXX,
Off-topic: I think you could spend some minutes to came up with a better nickname than a number
My execution plan show
You speak about the Execution Plan but you did not provided it. Please provide the Execution Plan (the full EP which mean the XML and not a screenshot), so we will have something to discuss about
high cost on a temp table insert to all the columns within the temp table
We cannot change the fact that writing to the disk cost. You can take some general actions to improve performance of INSERT like
(1) using fast SSD
(2) test the option to create the table fist and use INSERT INTO instead of SELECT INTO
(3) remember to drop temp tables as quickly: as you can
(4) Do NOT create indexes
Indexes meant to help in finding the rows and cannot help in INSERT
(5) tempdb serves all the databases and might be busy. Test the option of using regular table in the database if this fit your system
(6) Check the option of using a memory-optimized table variable
The sp calls other sp that creates temp tables instead
Are you sure that the issue in the INSERT and not the select for example? Well the Execution Plan might help in this. Try to simplifies the procedure
CREATE NONCLUSTERED INDEX I
Obviously create index not help you in insert data.
Try to provide more information and the Execution Plan