tcollins
May 19th, 2000, 04:49 AM
I have been reading the threads concerning performance problems with ADO and Microsoft SQL Server. I have the same problem...and no solutions. Lets assume the hardware is ok because we can create and update LARGE MS Access 97 databases on the server from any client...FAST. The hardware/network isn't an issue. DAO with Access 97 isn't an issue...its fast...really fast. However, the need is now to move up the chain to something better...like SQL Server...to better fit the needs.
Here is where things get REALLY slow. For DAO and Access 97 to create a database file and store 10,000 record takes maybe 2 seconds. Using ADO and SQL to perform the same function takes forever. 1000 records takes 2 minutes. The destination files/databases are stored on our remote server. Now, we monitor the TCP network traffic on the server...we see that Access rails up to 25% using a sharp slope...SQL takes a broadband behavior at 25% over how ever long it takes to store our data.
I've tried direct SQL Statements "INSERT INTO...". I've tried record sets, I've tried DAO with SQL...very slow. I've tried NOT using the ODBC...very slow. Its not the server we set up because we checked ourselved against a know-to-be-fast server.
This is our little test program (a little edited but you got the idea):
Const DBDriver = "{SQL Server}"
Const DBServer = "SQLserver"
Const DBUid = "user"
Const DBPwd = "passwd"
Const DBdatabase = "pubs"
Const DBProvider = "SQLOLEDB"
Set adb = New ADODB.Connection
adb.ConnectionString = "Provider=" & DBProvider & ";" & "server=" & DBServer & ";" & "Uid=" & DBUid & ";" & "Pwd=" & DBPwd
adb.Open
SQLString = "CREATE DATABASE TEST2"
adb.Execute SQLString
SQLString = "USE TEST2"
adb.Execute SQLString
SQLString = "CREATE TABLE Counter (Count1 int)"
adb.Execute SQLString
For I = 1 To 1000
SQLString = "INSERT INTO Counter VALUES (" & I & ")"
adb.Execute SQLString
Next I
adb.Close
Here is where things get REALLY slow. For DAO and Access 97 to create a database file and store 10,000 record takes maybe 2 seconds. Using ADO and SQL to perform the same function takes forever. 1000 records takes 2 minutes. The destination files/databases are stored on our remote server. Now, we monitor the TCP network traffic on the server...we see that Access rails up to 25% using a sharp slope...SQL takes a broadband behavior at 25% over how ever long it takes to store our data.
I've tried direct SQL Statements "INSERT INTO...". I've tried record sets, I've tried DAO with SQL...very slow. I've tried NOT using the ODBC...very slow. Its not the server we set up because we checked ourselved against a know-to-be-fast server.
This is our little test program (a little edited but you got the idea):
Const DBDriver = "{SQL Server}"
Const DBServer = "SQLserver"
Const DBUid = "user"
Const DBPwd = "passwd"
Const DBdatabase = "pubs"
Const DBProvider = "SQLOLEDB"
Set adb = New ADODB.Connection
adb.ConnectionString = "Provider=" & DBProvider & ";" & "server=" & DBServer & ";" & "Uid=" & DBUid & ";" & "Pwd=" & DBPwd
adb.Open
SQLString = "CREATE DATABASE TEST2"
adb.Execute SQLString
SQLString = "USE TEST2"
adb.Execute SQLString
SQLString = "CREATE TABLE Counter (Count1 int)"
adb.Execute SQLString
For I = 1 To 1000
SQLString = "INSERT INTO Counter VALUES (" & I & ")"
adb.Execute SQLString
Next I
adb.Close