Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 822
  • Last Modified:

Timeout Exception while retrieving large amount of data from oracle db using .net code

Hi,

I have more than 30,000 records in my database and i have to display it as excel sheet, for that i have retrived the data as dataset and then converted it to excel.But if i am retrieving 1000 or more no of rows its taking large amount of time, some time timeout exception is occuring.

I am using oracle as backend and c# as front end, if anybody knows the solution rply.

0
guvera
Asked:
guvera
  • 3
  • 3
1 Solution
 
simpsolCommented:
Change the connection timeout setting to a larger value on the command object first and see if that helps otherwise you can change the timeout on connection object

Eg.
oCmd.Timeout = 180;   // oCmd Command Object

oConn.Timeout = 180;  //oConn Connjection Object
0
 
guveraAuthor Commented:
Is there any solution to reduce the loading time. (loading the data from db server)?
0
 
simpsolCommented:
Do not fully understand what you mean. The performance of your query will depend on how the query is optimized and what your infrastructure is. I have queries return result with more than 100,000 results in about 3-5 seconds
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
guveraAuthor Commented:
How can i optimize the query, In my query one view is creating by selecting the all values from the table and some other user defined functions.In user defined functions each id from the table is passing and corresponding values are retrieving using cursor.Finally in stored procedure some fields are selecting from this view -based on some conditions.
0
 
simpsolCommented:
I donot think anyone can help you optimize the query. You will have to do that as you know your database table structure, how indexes are setup etc. You can start with creating a query plan for your query and see what it returns. You can find additional details on asktom.com website he has good articles on how to create and interpret the query plan. Also a book on oracle would show you that, it is a bit of an advance topic so if you are interested in learning I would look at the website.
0
 
guveraAuthor Commented:
This would helpful to me partially.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now