October 31, 2003 at 7:59 am
I am executing the following query for deleting duplicate records from a table
Delete from TAB_Ex where not ID=(Select Max(ID) from TAB_Ex T where T.Name=TAB_Ex.Name)
In the above query TAB_Ex is the table name, ID is Autonumber (Unique id) and Name represents Chat field which is having duplicate entries
My problem is when i am executing this query, it is taking around 10 minutes to complete the query execution in MS Access
But when i run the same qury in SQL Server2000 there is no problem.
The table contains around 12000 records and out of 4000 records are duplicate
what could be the reason?
October 31, 2003 at 1:56 pm
Using 'not in' doesnt usually optimize well, you might try rewriting it in a different form. Not the best answer I know. Could also do a pass through query.
Andy
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy