Fastest way to delete all records?
Posted: Thu 21 Dec 2017 00:02
I have a few tables that I use for temporary functions, and they can get very big - like 2.6 million records in my latest project. I need to delete these all the time, and it is very slow. It almost takes longer than filling them!
I am currently setting up a UniQuery and running SQL like 'DELETE FROM TEMPTABLE'.
Is there a faster way to do it? I am thinking of Dropping the table and then recreating it again. But before I do that, are there any functions in UniDac that might help? The Batch delete option does not seem much use as I simply want to delete everything and I don't have a primary key that I know the value of to setup any parameters with.
I am currently setting up a UniQuery and running SQL like 'DELETE FROM TEMPTABLE'.
Is there a faster way to do it? I am thinking of Dropping the table and then recreating it again. But before I do that, are there any functions in UniDac that might help? The Batch delete option does not seem much use as I simply want to delete everything and I don't have a primary key that I know the value of to setup any parameters with.