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!

Performance problem between Oracle.DataAccess v1 and v2

12501Aug 31 2007 — edited Aug 31 2007
Hi, I have serious performance problem with OracleDataReader when I use the GetValues method.

My server is Oracle 9.2.0.7, and i use ODAC v10.2.0.221
I create a dummy table for benchmark :

create table test (a varchar2(50), b number)

begin
for i in 1..62359 loop
insert into test values ('Values ' || i, i);
end loop;
commit;
end;

I use the same code for benchmark Framework v1 and Framework v2.
Code :

try {
OracleConnection c = new OracleConnection("user id=saturne_dbo;password=***;data source=satedfx;");
c.Open();
go(c);
c.Close();
}
catch (Exception ex) {
MessageBox.Show(ex.Message);
}

private void go(IDbConnection c) {
IDbCommand cmd = c.CreateCommand();
cmd.CommandText = "select * from test";
cmd.CommandType = CommandType.Text;
DateTime dt = DateTime.Now;
IDataReader reader = cmd.ExecuteReader();
int count = 0;
while (reader.Read()) {
object[] fields = new object[reader.FieldCount];
reader.GetValues(fields);
count++;
}
reader.Close();
TimeSpan eps = DateTime.Now - dt;

MessageBox.Show("Time " + count + " : " + eps.TotalSeconds);
}


Result are :
Framework v1 with OracleDataAccess 1.10.2.2.20 "Time 62359 : 0.5"
Framework v2 with OracleDataAccess 2.10.2.2.20 "Time 62359 : 3.57" FACTOR 6 !!!!!

I notice same problem with oleDb provider and Microsoft Oracle Client provider..

It's a serious problem for my production server, the time calculation explode...
Where is the explication ?

Do u know solution ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 28 2007
Added on Aug 31 2007
2 comments
739 views