Oracle too slow in .Net
-
Hi all. I have to read from oracle data base large amount of data (about 5000 records), and i use for this purpose standard procedure
oraDataTableAdapter.Fill(oraDataTable)
, but this working very slow (about 15 seconds). In other side when i fill data table from MS SQL (with same number of records) its occupied mach less time. How i can to decrease time consumption for this operation for Oracle. THANK -
Hi all. I have to read from oracle data base large amount of data (about 5000 records), and i use for this purpose standard procedure
oraDataTableAdapter.Fill(oraDataTable)
, but this working very slow (about 15 seconds). In other side when i fill data table from MS SQL (with same number of records) its occupied mach less time. How i can to decrease time consumption for this operation for Oracle. THANKConvert to SQL Server
only two letters away from being an asset
-
Hi all. I have to read from oracle data base large amount of data (about 5000 records), and i use for this purpose standard procedure
oraDataTableAdapter.Fill(oraDataTable)
, but this working very slow (about 15 seconds). In other side when i fill data table from MS SQL (with same number of records) its occupied mach less time. How i can to decrease time consumption for this operation for Oracle. THANK5000 records isn't really that much data, even a whole second would be too slow for getting the data. Do you have any means of running the query in a management tool in the database, so that you see if the query itself is slow, or the transfer to the DataTable. If the query itself is slow, check if you have indexes on the appropriate fields in the database tables. If the transfer is slow, check your connection string. On connectionstrings.com[^] you can find examples of connection strings for several different purposes.
Experience is the sum of all the mistakes you have done.
-
Hi all. I have to read from oracle data base large amount of data (about 5000 records), and i use for this purpose standard procedure
oraDataTableAdapter.Fill(oraDataTable)
, but this working very slow (about 15 seconds). In other side when i fill data table from MS SQL (with same number of records) its occupied mach less time. How i can to decrease time consumption for this operation for Oracle. THANKMS has biased .NET to work well with SQL Server. If you want to go really fast don't use fill. Instead create type objects and use the datareader as well as appropriate Where clauses. In my experience, Oracle (when done correctly) will vastly outperform SQL Server.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway -
MS has biased .NET to work well with SQL Server. If you want to go really fast don't use fill. Instead create type objects and use the datareader as well as appropriate Where clauses. In my experience, Oracle (when done correctly) will vastly outperform SQL Server.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest HemingwayThank.
Ennis Ray Lynch, Jr. wrote:
In my experience, Oracle (when done correctly) will vastly outperform SQL Server.
You mean what Oracle data reading is done correctly only through DataReader???? I just wander what internaly Fill method implemented throught DataReader isn't it????
-
5000 records isn't really that much data, even a whole second would be too slow for getting the data. Do you have any means of running the query in a management tool in the database, so that you see if the query itself is slow, or the transfer to the DataTable. If the query itself is slow, check if you have indexes on the appropriate fields in the database tables. If the transfer is slow, check your connection string. On connectionstrings.com[^] you can find examples of connection strings for several different purposes.
Experience is the sum of all the mistakes you have done.
Thank Query work fine in managment tool. As such as i think that problem in Oracle framework. And how connection string can affect speed of data retriving????
-
Thank.
Ennis Ray Lynch, Jr. wrote:
In my experience, Oracle (when done correctly) will vastly outperform SQL Server.
You mean what Oracle data reading is done correctly only through DataReader???? I just wander what internaly Fill method implemented throught DataReader isn't it????
El'Cachubrey wrote:
You mean what Oracle data reading is done correctly only through DataReader????
Of course not. A data reader is slightly faster as there is less overhead, but the difference is far from what you describe.
El'Cachubrey wrote:
I just wander what internaly Fill method implemented throught DataReader isn't it????
Yes. The difference is the overhead that is added by the DataTable.
Experience is the sum of all the mistakes you have done.
-
Thank Query work fine in managment tool. As such as i think that problem in Oracle framework. And how connection string can affect speed of data retriving????
El'Cachubrey wrote:
And how connection string can affect speed of data retriving????
Different database providers perform differently in certain situations. Also, the connection string can contain settings that may affect the performance of a provider. Have you examined the network traffic when the application runs the query? This could tell you if it's connecting to the database or transfering the data that takes time. It could also tell you if the amount of data looks reasonable, or if there is a lot of overhead.
Experience is the sum of all the mistakes you have done.