I created an application to compare Microsoft Access and MySQL.

Here are my connections string for both:

For MDB :
VB Code:
  1. Call m_connMDB.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Data.mdb;Persist Security Info=False")

For MySQL :
VB Code:
  1. Call m_connMySQL.Open("DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=Data;USER=root;PASSWORD=grb;OPTION=3;")

I have 1 table in both DB.

The table is called "Test" and have 3 integer fields.

I have a loop that run through all records and add 1 to the value and save it.

For MDB :
VB Code:
  1. Set rstMDB = New ADODB.Recordset
  2.  
  3.   Call rstMDB.Open("SELECT * FROM Test", m_connMDB, adOpenDynamic, adLockOptimistic)
  4.  
  5.   Do While Not rstMDB.EOF
  6.     rstMDB.Fields("FIELD1") = rstMDB.Fields("FIELD1") + 1
  7.     rstMDB.Fields("FIELD2") = rstMDB.Fields("FIELD2") + 1
  8.    
  9.     Call rstMDB.Update
  10.    
  11.     Call rstMDB.MoveNext
  12.   Loop
  13.  
  14.   Call rstMDB.Close
  15.   Set rstMDB = Nothing

For MySQL :
VB Code:
  1. Set rstMySQL = New ADODB.Recordset
  2.  
  3.   Call rstMySQL.Open("SELECT * FROM Test", m_connMySQL, adOpenDynamic, adLockOptimistic)
  4.  
  5.   Do While Not rstMySQL.EOF
  6.     rstMySQL.Fields("FIELD1") = rstMySQL.Fields("FIELD1") + 1
  7.     rstMySQL.Fields("FIELD2") = rstMySQL.Fields("FIELD2") + 1
  8.    
  9.     Call rstMySQL.Update
  10.    
  11.     Call rstMySQL.MoveNext
  12.   Loop
  13.  
  14.   Call rstMySQL.Close
  15.   Set rstMySQL = Nothing

The MDB loop takes 3 seconds to execute and the MySQL loop takes 197 seconds to execute.

Am I doing something wrong?