Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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.
  #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



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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.