Selasa, 05 Agustus 2014

[MS_AccessPros] Update query runs too slowly

 

I'm trying to run this update query on a 1.6 million record table, but it executes way too slowly. I let it run overnight for about 7 hours, and this morning the progress bar indicated that it was only about 25% done. I know that subqueries are slow, but this just won't work. I'm trying to flag records where phone numbers AND legislative district are duplicated.


Is there any other construct or approach I can use to update the field in a reasonable time? Using Access 2010 on Windows 7 Pro.

Thanks!!!
——
UPDATE Registrations SET Registrations.xDupPhoneDistrict = 1
WHERE (((Registrations.PhoneNumber) In (SELECT [PhoneNumber] FROM [Registrations] As Tmp2 WHERE Tmp2.PhoneNumber = Registrations.PhoneNumber AND Tmp2.StateRepresentativeDistrict = Registrations.StateRepresentativeDistrict  GROUP BY [PhoneNumber] HAVING Count(*)>1 )));

——
James
www.james-mc.com
Words To Live By

__._,_.___

Posted by: James McAlister <kc5qeg@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

.

__,_._,___

Tidak ada komentar:

Posting Komentar