I am using SQL Server 2008 and I want to configure all stored procedures that are time consuming
Whenever I execute a stored procedure separately, I get the result in a short time.
Whenever we run a load test for 100 users, the results are pretty bad.
I am using a .NET application with SQL Server 2008
Is there any way to find out what the problem is for this?
If the code works fine in SSMS, but not in .NET, this may be due to the sniffing parameter. Try adding the following query at the end of each select statement:
OPTION (RECOMPILE)
SSMS .NET, sniffing. - , . , . , , :
create proc myproc (@param1 int, @param2 varchar(20)) as declare @var1 int declare @var2 varchar(20) set @var1 = @param1 set @var2 = @param2 select <columns> from <table> where <column x> = @var1 And <column y> = @var2
, , :
http://blogs.msdn.com/b/turgays/archive/2013/09/10/parameter-sniffing-problem-and-workarounds.aspx
, , , //.
, , - .Net. .Net- , , .
; , CPU, - . - 100%, . , , . , , , CPU , - , .
SQL Server Profiler . - - , . , ( ). ( 1 ).
, . , , , , . , , .
Source: https://habr.com/ru/post/1570134/More articles:Link to global primitives and objects - pythonPromises inside the loops - promiseHow to set firefoxdriver driver path in selenium - javaОтправка объекта ошибки из порожденного дочернего процесса по IPC-каналу - javascriptREST API-интерфейс проверки подлинности и авторизации с помощью файлов cookie на стороне клиента - angularjsDropdown list not showing in Firefox - htmlHow to add a color legend to the matte matrix R - rExtremely slow even with TLongObjectHashMap - javaUsing a single StringBuilder - throws an OutofmemeoryException - javadelete / cut everything between two templates (download for registration) vim - vimAll Articles