Oracle ODBC and DAO extremely slow
400804Aug 8 2003 — edited Aug 13 2003Hi
I'm using Microsoft DAO 3.6 with an Oracle ODBC connection (version 9.2) in an VB6 application.
Opening an updateable dynaset is extremely slow, I have measured the performance with Oracle ODBC, Microsoft Oracle ODBC and Microsoft SQL-Server ODBC as follows:
Oracle ODBC: 1952 ms
MS Oracle ODBC: 360 ms
MS SQL-Server ODBC: 40 ms (connection to a MS SQL-Server)
If I use the SQLpassthrough option the result is about 10 ms in all 3 cases, but the dynaset is readonly !
The testing program is as follows:
-------------------------------------------------------
Option Explicit
Private Declare Function timeGetTime Lib "winmm.dll" () As Long
Private Sub Form_Load()
Dim wsdata As DAO.Workspace
Dim db As DAO.Database
Dim dbconn As String
Dim rs As DAO.Recordset
Dim start As Long
dbconn = "ODBC;DSN=AdhocitORA;UID=adhocit;PWD=adhocit;"
Set wsdata = DBEngine.Workspaces(0)
Set db = wsdata.OpenDatabase("", False, False, dbconn)
start = timeGetTime
Set rs = db.OpenRecordset("Select * from Afdeling", dbOpenDynaset)
rs.MoveLast
rs.MoveFirst
rs.Close
Set rs = Nothing
MsgBox "Time " & timeGetTime - start
End Sub
-------------------------------------------------------
Is there any setting in the Oracle ODBC, that need to be adjusted ??
Erling