OLEDB (msdaora) vs ODP.NET

digitalenigma

Member
Joined
Mar 27, 2003
Messages
6
Hi,

I recently installed Oracles ODP.NET and tested it against OLEDB (msdaora). I created a simple grid and fetched some data as follows:

Code:
Dim cn As New OracleConnection("data source=xxxx;user id=xxxx;password=xxxx;")
Dim da As New OracleDataAdapter("select * from inventory", cn)
Dim ds As New DataSet
Dim dt As New DataTable("inventory")

Dim starttime As Date = Now

da.Fill(dt)
ds.Tables.Add(dt)
da.SelectCommand.CommandText = "select * from inventory_task"
dt = New DataTable("inventory_task")
da.Fill(dt)
ds.Tables.Add(dt)

Dim endtime As Date = Format(Now, "s")

MsgBox(DateDiff(DateInterval.Second, starttime, endtime))

ug.SetDataBinding(ds, "inventory_task")

I tested the above code using OLEDB and ODP.NET classes and found that OLEDB was twice as fast. Essentially, I have a to populate a grid with ~15000 large records. OLEDB takes about 45 seconds and ODP.NET takes about 100. Am I doing something wrong? Is there a built in option that specifies to the provider to only retrieve N rows and get the rest according to grid scrolling (this would significantly speed up performance and would be the preferred solution)?

Best Regards,
Allister
 
Back
Top