I have a script that appends (INSERT INTO) records from a staging table to a production table that has many indexes on it. At the end of the script I refresh all the indexes automatically for that table (using DBCC DBREINDEX(tblName,'').
Is there a way to have the indexes update automatically during the INSERT INTO statement, so that I don't have to run the DBREINDEX statement?
I realize this might not be optimal from a performance standpoint, but would like to test it anyway, do some comparisons, etc.
Is there a setting that lets me do this?