using (OracleConnection oracleConnection = new OracleConnection(dbContext.Database.Connection.ConnectionString))
{
oracleConnection.Open();
OracleCommand oracleCommand = oracleConnection.CreateCommand();
oracleCommand.CommandText = "DT_CMS_********"; // procedure name
oracleCommand.CommandType = CommandType.StoredProcedure;
oracleCommand.FetchSize = 500000; // 500KB internal cursor cache
var Parameter1 = new OracleParameter("languageCode", OracleDbType.Varchar2)
{
Value = value1
};
OracleParameter[] oracleParameters = new OracleParameter[8];
oracleParameters[0] = Parameter1;
oracleCommand.Parameters.AddRange(oracleParameters);
DataTable dataTable = new DataTable();
OracleDataAdapter oracleDataAdapter = new OracleDataAdapter(oracleCommand);
oracleDataAdapter.Fill(dataTable);
foreach (DataRow row in dataTable.Rows)
{
header currentheader = new header
{
Version = 0,
};
result.Add(currentheader);
}
oracleDataAdapter.Dispose();
oracleCommand.Dispose();
oracleConnection.Dispose();
oracleConnection.Close();
}
In the above code , we are not able to figure out and fix the extra call been made to fetch the row count. Below dynatrace trace shows there is another call to stored procedure is made to fetch the rows count.

Performance of the code above is greatly impacted due to this extra call to the stored procedure.
other information:
ODP.net version 4.0 is used for data access
Oracle 11 g
there is a 30 milliseconds roundtrip latency between app server and database server.
No. of rows `being fetched is 4K . size of each row is <1 Kb
stored procedure does the simple Select * from table where xxx
Can any one help to understand why the other call is made and how to avoid it , row count is not needed in this case. The time lag between the main call and the second call is what is hurting the overall performance.
The above code was using Oracle Data reader , we tried to change it to Oracle Data adapter and set the FETCH size but we still see the other call made.