I had to create indexes with included columns due to high I/O, nested loops joins, and key look ups that blocked inserts:
SELECT * FROM Table WHERE (Column1 = 'ED69K')
I created an index on Column1 with 20 included columns for the rest of the columns in the select list.
SELECT TOP (50000) * FROM Table WHERE datetime = 6/10/2021
Create index on Datetime with 20 included columns for the rest of the columns in the select list.
The above two indexes reduced nested loops joins and key lookups, but at the same time increased the database space.
Now since the indexes are both identical, with only the key columns changing, will the inserts now take twice the time?
I have a clustered Index on the ID column, but the where clause is not filtering by the ID. The optimizer uses the cluster index to find rows which are not in the non clustered index.