Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OracleDataReader.Read taking too long for the first record

680107Jan 15 2009 — edited Jan 15 2009
Hi Guys

I am new to ODP.Net. This is my first time working with Oracle and ODP.Net. I wrote a small stored procedure which returns 25 rows and returns a sys_refcursor. I am capturing that in a OracleDataReader and trying to process the data. I use this in a while loop... the first Read is taking around 10 seconds and from the second on, it is pretty quick. Stored procedure performace is really good when I run it from the SQLPlus or data execute call from .Net. Both web server and database are in the same network, which is really good.

Any idea what's going on? Any links or articles ro any help will be greatly appreciated...

I am using Oracle 10g with ODP.net 10.2.0.2.20. and using .Net Framework 3.5 with Visual Studio 2008.

Here is the code I am using (it is really simple)

Private Sub FillSearchResults(ByVal DR As Oracle.DataAccess.Client.OracleDataReader)

Dim objSearch As OCPAFL.DAL.Search
Dim objList As New List(Of Parcel)
Try
'Walk through Projects
While DR.Read()
''''.... do the processing here
End While
Catch ex As Exception
Throw ex
End Try
End Sub

Thanks
Chandra
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 12 2009
Added on Jan 15 2009
5 comments
5,834 views