只是想发回我对此的最终解决方案......
对于 60,000 条记录样本量,我尝试了以下方法,根据来自其他表的值的组合将属性分配给主表:
Solution 1: Used a combination of SQL queries and FSO Dictionary objects to assign attribute
Result: 60+ minutes to update 60,000 records
Solution 2: Ran script from Solution 1 concurrently from 3 separate instances of Excel
Result: CPU was maxed out (Instance 1 - 50% of CPU, Instances 2 and 3 - 25% each); stopped the code after an hour since it wasn't a viable solution
Solution 3: Tried using SQL UPDATE queries to update main table with the attribute
Result: This failed because apparently Access does not allow for a join on an UPDATE sub-query (or I just stink at writing SQL)
Solution 4 (Best Result): Selected all records from main table that matched the criteria for each attribute,
output the records into csv and assigned the attribute to all records in the csv file.
This created a separate file for each attribute, all in the same format. I then
imported and appended all of the records from the csv files into a new main table.
Result: 2.5 minutes to update 60,000 records
特别感谢 Pynner 和 Remou,他们建议将数据写入 csv。
我从没想过这是用属性更新记录的最快方法。如果你没有提出这个建议,我可能会认为用 Access 和 VBA 不可能完成这个项目。非常感谢您分享您的智慧!