|
-
Feb 3rd, 2018, 02:25 PM
#2
Re: Deleting selected records from a large database table
 Originally Posted by TedH
I thought the most obvious method would be:
Dbs.Execute "DELETE FROM " & tblAcronym & " WHERE " & acrSOURCE & " = '" & sRecordType & "'"
It is - and from my experience, it should have outperformed your "explicit looping"-approach.
The reasons it didn't could be caused by:
- your DB is sitting on a Network-Share
- you currently don't have an Index defined on the Field(s): acrSOURCE
- you didn't wrapp the Execute-Statement in a transaction
I'm quite sure, that with "proper indexing" - then "performing the Delete-Action" against a local DB (placed on one of your local Disks) -
and wrapping the thing in a transaction - it would "fly" and outperform the explicit looping.
Olaf
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|