briana02
May 21st, 2001, 01:50 PM
Hello all,
I have an app that is updating a VERY large table, > 700,000 records. The app reads updated records from a file, then writes them to the table. Well, the file itself containes 44,000 records and when I run the application, it is incredibly slow (I calculated that it would take 39.3 days for the program to run...lol). Here's my program logic: I read a record from the file, check to see if that record exists in the DB by opening a ado recordset with a SQL statement like the following:
"SELECT [Field1], [Field2] FROM [TABLE] WHERE [Field1] = '" & strPrimaryKey & "'"
where strPrimaryKey is a string containing the primary key read from the file. As you can probably imagine, returning the result set 44,000 times (for each record read from the file) from a table with over 700,000 records is VERY Slow. Anyone have any suggestions?
Thanks in advance
Brian
I have an app that is updating a VERY large table, > 700,000 records. The app reads updated records from a file, then writes them to the table. Well, the file itself containes 44,000 records and when I run the application, it is incredibly slow (I calculated that it would take 39.3 days for the program to run...lol). Here's my program logic: I read a record from the file, check to see if that record exists in the DB by opening a ado recordset with a SQL statement like the following:
"SELECT [Field1], [Field2] FROM [TABLE] WHERE [Field1] = '" & strPrimaryKey & "'"
where strPrimaryKey is a string containing the primary key read from the file. As you can probably imagine, returning the result set 44,000 times (for each record read from the file) from a table with over 700,000 records is VERY Slow. Anyone have any suggestions?
Thanks in advance
Brian