I am evaluating SQL server and therefore I made a benchmark comparing the search speed betwenn Access (which we are using up to now) and SQL-Server.

I created 2 identical tables on the same Server, once as Access database file, once in SQL-Server with one Counter as Primary Key and Index and one string*255
The tables have 2.700.000 entries each.

Then I benchmarked 5000 arbitrary searches on both tables

The results of this benchmark are so strange and surprising, so I would like to find out, if there is a major error in my application!!!

Searching the MS-Access table takes about 3 seconds
!!!!!!!!Searching the table with SQL server takes 60-70 seconds!!!!!!!!!!
The primary index in the SQL-table is existing and working, I checked with the SQL profiler and the index optimizer wizard.
Am I doing anything absolutely wrong?????
I would be happy for any hints.

I am using this code:

Alternative 1 with MS-Access and DAO:
Dim Test_DB As DAO.Recordset, DB As Database
Dim I as Long, J as LongSet DB = DBEngine.Workspaces(0).OpenDatabase("G:\CADBDat.md b")
Set Test_DB = DB.OpenRecordset("Test", DB_OPEN_TABLE)
Test_DB.Index = "PrimaryKey"
For J = 1 To 5000
I = CLng(Rnd() * 2791680)
Test_DB.Seek "=", I
Next J

Alternative 2 with SQL-Server and ADO:
Dim SQLConn As New ADODB.Connection
SQLConn.ConnectionTimeout = 25
SQLConn.Provider = "sqloledb"
SQLConn.Properties("Data Source").Value = "W2SERVER"
SQLConn.Properties("Initial Catalog").Value = "CADBase" SQLConn.Properties("Integrated Security").Value = "SSPI"
SQLConn.Open
Dim Test_SQL As New ADODB.Recordset
For J = 1 To 5000
I = CLng(Rnd() * 2791680)
Test_SQL.Open "SELECT * FROM Test WHERE ID=" & CStr(I) & ";", SQLConn, adOpenStatic, adLockOptimistic
Next J