I have a table, which has over 5 million records in it. I have been attempting to delete all but about 1/2 million records. The deletion, indexed on the datetime field takes in excess of 20 hours. I must stop it at this point.
I have decided to truncate the table. My question is this. Upon truncating the table, will all indexes, stored proceedures, views, be left entact? I am assuming with a truncated table that all be be in place, and I will be left with a shell (table).
Also for future reference, how would I build a trigger to delete all records older than 30 days? I assume this will be built in the above table as a trigger.
New to SQL Server
Dobe
I have decided to truncate the table. My question is this. Upon truncating the table, will all indexes, stored proceedures, views, be left entact? I am assuming with a truncated table that all be be in place, and I will be left with a shell (table).
Also for future reference, how would I build a trigger to delete all records older than 30 days? I assume this will be built in the above table as a trigger.
New to SQL Server
Dobe