Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 2nd, 2007, 12:03 PM
Registered User
 
Join Date: Oct 2007
Location: Dublin, , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQLDataReader - Extremely poor performance

Hi Guys,

I am new to ASP .NET and ADO, I have a stored proc doing a select query based on parameters from user input (drop down lists, etc.) If I run the code on the MS SQL Server mgmt studio, the query only does about 200 reads (is fairly well tuned as my background is on Business Intelligence).

When the code is run by my ASP .NET 2.0 page over 9000000 reads are performed, I took the code performing the query out of my page ran it standalone on a new page.

Even if all I do is:

string conn;
SqlParameter[] prams = {...Add params according to user input on form...};
SqlDataReader odr = SqlHelper.ExecuteReader(conn, CommandType.StoredProcedure, "myStoredProc", prams);
myReader.Close();

The code still des the same massive number of reads, even if I don't do anything programmatically to the dataset and close the connection immediately as above.

I have run out of ideas, and have tried DataSet, DataAdapter, SQLDataSource on the aspx code, etc...

Some perform better (SqlDataSource for example) but they all do a ridiculous amount of reads in comparison to the procedure executed on the mgmt studio client, any idea why??

Many thanks,


M.
Reply With Quote
  #2 (permalink)  
Old October 2nd, 2007, 12:12 PM
Registered User
 
Join Date: Oct 2007
Location: Dublin, , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Woops, forgot to spell check the post, I was typing away in angry frustration

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Working with poor named Access procedures seananderson Classic ASP Professional 3 December 24th, 2006 12:42 PM
Extremely annoying VS.Net behavior katsarosj VS.NET 2002/2003 6 April 17th, 2006 09:21 AM
Problem with ComboBox - Extremely urgent Klesk C# 3 April 5th, 2006 06:00 AM
Poor performance with ADO stored proc. call aldovalerio VBScript 0 August 23rd, 2004 08:21 AM
Too long cleanup.asp for extremely big reports darkov Crystal Reports 0 March 8th, 2004 07:03 AM



All times are GMT -4. The time now is 07:24 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.