I have a database that is 70GB big. One of the tables has over 350
million rows of data. I need to delete about 1/3 of the data in that
one table.
I was going to use a simple delete command to delete the unnessacay
data.
Something like
Delete from tablename where columname > '100'
However, it takes SOOO LONG to run, over 8 hours, if not longer....
What is the best way to delete this data???
One idea was to create a Temp Table, then move the needed data to the
temp table, then Truncate the Table, and move that data back.
I'm not very good with SQL Query Language, so can somone give me an
example on how to do this?? Or if you have a differant idea that would
be faster please let me know.
thanks,
Sam
million rows of data. I need to delete about 1/3 of the data in that
one table.
I was going to use a simple delete command to delete the unnessacay
data.
Something like
Delete from tablename where columname > '100'
However, it takes SOOO LONG to run, over 8 hours, if not longer....
What is the best way to delete this data???
One idea was to create a Temp Table, then move the needed data to the
temp table, then Truncate the Table, and move that data back.
I'm not very good with SQL Query Language, so can somone give me an
example on how to do this?? Or if you have a differant idea that would
be faster please let me know.
thanks,
Sam
Comment