RE: Differences in execution times for a stored procedure
From: Cowboy (Gregory A. Beamer) - MVP (NoSpamMgbworld_at_comcast.netNoSpamM)
Date: 10/04/04
- Next message: Cowboy (Gregory A. Beamer) - MVP: "RE: Simple question"
- Previous message: Cowboy (Gregory A. Beamer) - MVP: "RE: DataBinding to a DataView -- only getting first row [repost]"
- In reply to: Vincent Keller: "Differences in execution times for a stored procedure"
- Next in thread: William \(Bill\) Vaughn: "Re: Differences in execution times for a stored procedure"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 4 Oct 2004 12:09:02 -0700
SQLClient or OleDb? If OleDb, you automatically lose some perf. Are you
explicitly typing all of the parameters or using simple notation:
SqlParameter param = new SqlParameter("@name", MyValue);
If you are using the above, you add some overhead.
Next, have you run a profile on the SQL, using SQL Profiler, to see where
the actual bog down is?
What kinds of T-SQL are you running? When called from "out of process"
certain types of queries can stick a bit.
--- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA *************************** Think Outside the Box! *************************** "Vincent Keller" wrote: > I am trying to execute a time-consuming stored procedure in my application. > When I run the stored procedure through Query Analyzer, it takes some time > but returns results in about 15-20 secs. However, when I run the same > procedure by using ExecuteScalar/ExecuteNonQuery it seems to take a lot more > time ( ~ 2-3 mins). > > I have ensured that I am not keeping the connection open for a long time as > well as used Indexes where required but that hasn't helped a lot. > > Are there some known performance differences in executing a query (stored > procedure) directly through Query Analyzer and through ADO.NET ? > > Any recommendations for such a scenario to speed up query performance ? > > >
- Next message: Cowboy (Gregory A. Beamer) - MVP: "RE: Simple question"
- Previous message: Cowboy (Gregory A. Beamer) - MVP: "RE: DataBinding to a DataView -- only getting first row [repost]"
- In reply to: Vincent Keller: "Differences in execution times for a stored procedure"
- Next in thread: William \(Bill\) Vaughn: "Re: Differences in execution times for a stored procedure"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading