[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Oracle Query Slow with C#

Posted on 2010-11-28
3
Medium Priority
?
1,633 Views
Last Modified: 2012-05-10
Dear experts,

I wrote a C# program connecting to a huge Oracle table (500 GB or more) and making a select query. The Oracle table is well designed and uses indexes. The problem is that the query returns the result set very slow. It takes approximately 7-8 min. However, when I run the same query in Toad, it takes 20 seconds. (Auto-trace is set, all the results are being fetched) I tried ODP.Net, again it did not make sense.

How can I keep up with this performance issue? Any recommendation welcomes. Even you can offer me a solution through different programming languages.

BR,
0
Comment
Question by:GurcanK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Accepted Solution

by:
roxviper earned 800 total points
ID: 34224501
0
 
LVL 7

Assisted Solution

by:jocave
jocave earned 800 total points
ID: 34224988
Are you certain that the query being executed in Toad is actually identical?  Are you using bind variables in the C# application, for example, while you are using literals in Toad?  Are you certain that there are no formatting differences between the queries?  If you are generating the same SQL_ID from both Toad and your application, are you seeing multiple query plans for that SQL_ID in the shared pool?

How much data are you fetching from Oracle?  I'm assuming you're not selecting the entire 500 GB.  But are you selecting thousands or millions of rows?  Or are you selecting dozens of rows?

0
 
LVL 3

Assisted Solution

by:abdkhlaif
abdkhlaif earned 400 total points
ID: 34225179
Are you using System.Data.OracleClient? DataSet?
Attach the code
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to recover a database from a user managed backup
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question