ADO.NET 2.0 Slows SP Execution By Large Factor

May 21, 2007

I'm hoping someone will be able to point me in the right direction for solving this problem as i've come a bit stuck.

The Sql Server 2005 Stored Procedure runs in about 3 secs for a small table when run from SQL Management Studio (starting with dbcc freeproccache before execution) but times out when run through ADO.NET on .NET (45 sec timeout).

I've made sure the connection was closed prior to opening and executing the adapter. I'm a bit stuck as where to check next though. 

Any ideas greatfully received, Thanks

View 6 Replies


ADVERTISEMENT

SQL Server 2005 Slows Down After A Large Number Of Queries

Jul 4, 2007

Hi,

We are running SQL Server 2005 Ent Edition with SP2 on a Windows 2003 Ent. Server SP2 with Intel E6600 Dual core CPU and 4GB of RAM. We have an C# application which perform a large number of calculation that run in a loop. The application first load transactions that needs to be updated and then goes to each one of the rows, query another table get some values and update the transaction.

I have set a limit of 2GB of RAM for SQL server and when I run the application, it performs 5 records update (the process described above) per second. After roughly 10,000 records, the application slows down to about 1 record per second. I have tried to examine the activity monitor however I can't find anything that might indicate what's causing this.

I have read that there are some known issues with Hyper-Threaded CPUs however since my CPU is Dual-core, I do not know if the issue applies to those CPUs too and I have no one to disable one core in the bios.

The only thing that I have noticed is that if I change the Max Degree of Parallelism when the server slows down (I.e. From 0 to 1 and then back to 0), the server speeds up for another 10,000 records update and then slows down. Does anyone has an idea of what's causing it? What does the property change do that make the server speed up again?

If there is no solution for this problem, does anyone know if there is a stored procedure or anything else than can be used programmatically to speed up the server when it slows down? (This is not the optimal solution however I will use it as a workaround)

Any advice will be greatly appreciated.

Thanks,
Joe

View 3 Replies View Related

SQL Server 2000 SP4 Slows Down Dts Job

Sep 20, 2007

Hi peeps,

We have just upgraded to Service Pack 4 on our SQL Server 2000.
We have had a DTS job that normally takes about four hours to complete(this dts job has been ok for the last three years).
However, after applying SP4, this DTS job now takes over 8 hours to complete.

There are no other processes running on the box and the box is a high end Dell machine with 8 Gig of RAM.

Any advice on this would be greatly appreciated.

Bal

View 14 Replies View Related

Local Variable Slows Down SP (?)

Dec 17, 2007

Hi guys I am sitting and testing som variants of this simple SP, and I have an question that I couldent answer with google or any thread in this forum.

Perhaps I am doing something really easy completly wrong here.

Why does the local variables in the first code segment slow down the overall execution of the procedure?
Dont mind the logic why I have them there are only testing som things out.

If i declare two variables the same way:
DECLARE @v INT
SET @v = 100

When I use it in a WHERE CLAUSE:
...WHERE [V] BETWEEN @v AND @x)
Is there any different then
...WHERE [V] BETWEEN 100 AND 200)

Cant figure this out, why does it hurt the performance so bad? As a C# guy its the same thing ?

Thanks in advance
/Johan

Slow

ALTER PROCEDURE [dbo].[spStudio_Get_Cdr]
@beginDate DATETIME = null,
@endDate DATETIME = null,
@beginTime INT,
@endTime INT,
@subscribers VARCHAR(MAX),
@exchanges VARCHAR(MAX) = '1:',
@beginDateValue int,
@endDateValue int
AS
BEGIN
SET NOCOUNT ON;

DECLARE @s INT
SET @s = @beginDateValue
DECLARE @e INT
SET @e = @endDateValue
print @s
print @e

DECLARE @exch TABLE(Item Varchar(50))
INSERT INTO @exch
SELECT Item FROM [SplitDelimitedVarChar] (@exchanges, '|') ORDER BY Item


DECLARE @subs TABLE(Item Varchar(19))
INSERT INTO @subs
SELECT Item FROM [SplitDelimitedVarChar] (@subscribers, '|') ORDER BY Item

SELECT [id]
,[Abandon]
,[Bcap]
,[BlId]
,[CallChg]
,[CallIdentifier]
,[ChgInfo]
,[ClId]
,[CustNo]
,[Digits]
,[DigitType]
,[Dnis1]
,[Dnis2]
,[Duration]
,[FgDani]
,[HoundredHourDuration]
,[Name]
,[NameId]
,[Npi]
,[OrigAuxId]
,[OrigId]
,[OrigMin]
,[Origten0]
,[RecNo]
,[RecType]
,[Redir]
,[TerId]
,[TermAuxId]
,[TermMin]
,[Termten0]
,[Timestamp]
,[Ton]
,[Tta]
,[Twt]
,[Level]
FROM
[dbo].[Cdr] AS C
WHERE
(C.[DateValue] BETWEEN @s AND @e)
AND
(C.[TimeValue] BETWEEN @beginTime AND @endTime)
AND
EXISTS(SELECT [Item] FROM @exch WHERE [Item] = C.[Level])
AND
(EXISTS(SELECT [Item] FROM @subs WHERE [Item] = C.[OrigId] OR [Item] = C.[TerId]))

END



Fast

ALTER PROCEDURE [dbo].[spStudio_Get_Cdr]
@beginDate DATETIME = null,
@endDate DATETIME = null,
@beginTime INT,
@endTime INT,
@subscribers VARCHAR(MAX),
@exchanges VARCHAR(MAX) = '1:',
@beginDateValue int,
@endDateValue int
AS
BEGIN
SET NOCOUNT ON;

DECLARE @exch TABLE(Item Varchar(50))
INSERT INTO @exch
SELECT Item FROM [SplitDelimitedVarChar] (@exchanges, '|') ORDER BY Item


DECLARE @subs TABLE(Item Varchar(19))
INSERT INTO @subs
SELECT Item FROM [SplitDelimitedVarChar] (@subscribers, '|') ORDER BY Item

SELECT [id]
,[Abandon]
,[Bcap]
,[BlId]
,[CallChg]
,[CallIdentifier]
,[ChgInfo]
,[ClId]
,[CustNo]
,[Digits]
,[DigitType]
,[Dnis1]
,[Dnis2]
,[Duration]
,[FgDani]
,[HoundredHourDuration]
,[Name]
,[NameId]
,[Npi]
,[OrigAuxId]
,[OrigId]
,[OrigMin]
,[Origten0]
,[RecNo]
,[RecType]
,[Redir]
,[TerId]
,[TermAuxId]
,[TermMin]
,[Termten0]
,[Timestamp]
,[Ton]
,[Tta]
,[Twt]
,[Level]
FROM
[dbo].[Cdr] AS C
WHERE
(C.[DateValue] BETWEEN @beginDateValue AND @endDateValue)
AND
(C.[TimeValue] BETWEEN @beginTime AND @endTime)
AND
EXISTS(SELECT [Item] FROM @exch WHERE [Item] = C.[Level])
AND
(EXISTS(SELECT [Item] FROM @subs WHERE [Item] = C.[OrigId] OR [Item] = C.[TerId]))

END

View 4 Replies View Related

SQL Server 2005 Slows Down

Feb 28, 2008

Hi MSDN PPL!

I have an SQL Server 2005 instance that slows down over time, she almost grinds to a halt. The data is being exposed via an ASP.Net 2.0 web interface. The web application gets slower and slower over a matter of days. If I restart the SQL Server process she comes back to life and starts serving as it should - nice and snappy.

The web application does not perform much writing to the DB, 90% of the time its just reading. The DB server is worked hard by a console application that produces data each day. This console app runs for about 30 minutes during which there is a lot of reading, processing and writing back to the DB as fast as the hardware will allow. Its this massive workload that is slowing the DB server.

This seems to be related to the amount of memory that SQL Server is using. When looking at Task Manager I can see that sqlservr.exe is using 1,878,904K, this figure continues to rise while the console app runs. I have seen it over 2 GB. When the console app finishes the memory is still allocated and performance is slow. This continues to get worse after a few days of processing.

The machine's specs are:

* Windows Server 2003 R2 Standard
* SQL Server 2005 Standard 9.00.3054.00
* Twin 3.2Ghz Xeons
* 3.5 Gb RAM

I plan to apply "Cumulative hotfix package (build 3152) for SQL Server 2005 Service Pack 2" in a blind hope to solve the problem.

Any suggestions?

Sorry if this is in the wrong place guys, couldn't find a general performance topic. Please move accordingly.

Thanks,
Matt.

View 3 Replies View Related

Text Column Slows Down Select

Jul 20, 2005

Hi All,We're running SQL Server 2000, SP3.I have a stored procedure that consists of a single Select statement.It selects a bunch of columns one of which is a column of data typeTEXT.SP takes 30 sec to run which causes timeouts on the Front End.When I comment out the Text column from the select it only takes 1Sec.Is there anything I can do about it? I know I can't index a Textcolumn. It's also not used in the where clause, so no need forFull-Text Search.But we absolutely have to have it in the Select clause.Thanks for the help in advance.~Narine

View 5 Replies View Related

Report Performance Slows Down As SP Is Run Multiple Times.

Oct 26, 2007

Hi all,
In my project, I have a website and through that, I run my reports. But the reports take a lot of time to render. When I checked the profiler, it showed that the SP for the report is run around 4-5 times. Due to this, the report rendering takes a lot of time.

When, I ran the SP with the same set of Parameters in Query Analyser, it ran in around 18 seconds. But when I ran the report from web interface, it took around 3 minutes to completely show the data. And the SP has been run 5 times.

I am having serious problems with Report's performance because of this. Many a times, report just times out. I have set the timeout as 10 minutes. And because the Sp is run 5 times, the report times out, if there is huge amount of data.

Any help would be appreciated.

Thanks in advance.
Swati

View 5 Replies View Related

Will Change In Index Slows Down Queries In SQL Server2000 Sp4.

May 12, 2008



Hi

Will change in index slows down queries in SQL Server2000 sp4.

Please help me

View 4 Replies View Related

T-SQL Select Statement Slows Down When Insert Into Is Put In Front

Mar 31, 2008

Hi

We have a t-sql statement in a SP that generates on average between 50 €“ 60 rows of data, pretty small! The statement references a View, some tables and temporary # table which has been created in the SP.

Everything works a treat and runs sub second until you put a Insert Into in front of the above statement scenario. The SP then takes a about a minute to run which happens to be about the same amount of time to generate all the data in the View.

I have not attached T-Sql statement at this stage as it runs ok without the Insert Into but would be happy to post it if need be.

Anybody else ever had this problem?

We are using SQL Server 2005 SP2 64 bit.

Art99

View 7 Replies View Related

Using Declared Variable As Passphrase Slows Query

Mar 13, 2008



I have two tables - gift_cards and history - each related by a field called "card_number". This field is encrypted in the history table but not in the gift_cards table. Let's say the passphrase is 'mypassphrase'. The following query takes about 1 second to execute with a fairly large amount of data in both tables:


SELECT max([history].[date_of_wash]) AS LastUse

FROM gift_cards AS gc LEFT JOIN history

ON gc.card_number=CAST(DecryptByPassPhrase('mypassphrase', HISTORY.CARD_NUMBER) AS VARCHAR(50))

GROUP BY gc.card_number


When I use a declared variable to contain the passphrase, the same query takes over 40 seconds. For example,


declare @vchPassphrase as nvarchar(20)

select @vchPassphrase = 'mypassphrase'

SELECT max([history].[date_of_wash]) AS LastUse

FROM gift_cards AS gc LEFT JOIN history

ON gc.card_number=CAST(DecryptByPassPhrase(@vchPassphrase, HISTORY.CARD_NUMBER) AS VARCHAR(50))

GROUP BY gc.card_number


This query is part of a stored procedure and, for security reasons, I can't embed the passphrase in it. Can anyone explain the discrepancy between execution times and suggest a way to make the second query execute faster?

Thanks,
SJonesy

View 4 Replies View Related

SQL Integration Services Data Flow Task Slows Down

Dec 7, 2007

We are using an OLE DB Source for the Data Flow Source and OLE DB Destination for the Data Flow Destination. The amount of data being moved is about 30 million rows, and it is gather using a sql command. There is not other transformations in between straight from one to another. The flow starts amazingly fast but after 5 million rows it slows considerably. Wondered if anyone has experienced anything similar with large loads.

View 6 Replies View Related

SSIS Data Flow Task Slows During Bulk Insert

May 31, 2007

I have an SSIS Package which is designed to import log files. Basically, it loops through a directory, parses text from the log files, and dumps it to the database. The issue I'm having is not with the package reading the files, but when it attempts to write the information to the db. What I'm seeing is that it will hit a file, read 3000 some lines, convert them (using the Data Conversion component), and then "hang" when it tries to write it to the db.



I've run the SQL Server Profiler, and had originally thought that the issue had to do with the collation. I was seeing every char column with the word "collate" next to it. On the other hand, while looking at the Windows performance monitor, I see that the disk queue is maxed at 100% for about a minute after importing just one log file.



I'm not sure if this is due to the size of the db, and having to update a clustered index, or not.



The machine where this is all taking place has 2 arrays- both RAID 10. Each array is 600 GB, and consists of 8 disks. The SSIS package is being executed locally using BIDS.



Your help is appreciated!



View 2 Replies View Related

Fill Factor Fix

Apr 3, 2001

Currently we have tables (in sql 6,5), many of them do not have primary keys.
While I was trying to re-index (re-org), many of them got an error:
"fillfactor 204 is not a valid percentage; fillfactor must be between 1 and 100."
(many tables' fillfactor exceed 100 or more...)
How can I fix them so I can upgrade to sql 7 ?
Thank you for your help.

View 3 Replies View Related

Fill Factor

Aug 13, 2001

I am really confused about this whole fill factor thing. The way I understand it, is if you have a table whose data remains pretty much static, you should use a higher fill factor. Suppose you had a database where you had at most 150 transactions a day that changed the data, should the fill factor be left at the default(0) or increased? How do you determine how much to increase it? Is there a rule of thumb that suggests if you have x number of changes against a table, you should have a fill factor between y and z percent?

Please Help

Chris

View 2 Replies View Related

Fill Factor

Mar 12, 2001

Hi all,
While creating indexes for a table, I specified a fill factor of 70%. I then inserted a few hundred rows into the table. Is it possible to check to what percent the pages are full after the rows have been inserted?

Thanks in advance,
Praveena

View 1 Replies View Related

Fill Factor

Jul 16, 1999

You have a db with 50,000 records and you want to add 100,000 more. What should the right fill factor be? Is there a way to "calculate" a fill factor if you don't want to use default? Any help is appreciated. Thank you.

View 3 Replies View Related

Fill Factor

Jan 18, 2005

If fill factor is specified as 100 for a table what will be the impact of this?I want to know any updation or insertion will be possible or not?

View 3 Replies View Related

How To Set Fill Factor?

Aug 27, 2007

Hellow, everyone"

I have a web online table that is inserted about 1500 record one day. Each night, a DST is running to pull all data to anther database. How to set fill factor on a one column index to get the best performance? Current fill factor is 80%.

Thanks

ZYT

View 7 Replies View Related

Performance Factor

May 20, 2008

How Index will help to optimize SP.

spatle

View 1 Replies View Related

Fill Factor

Jul 13, 2007

Hi experts, I would like to ask regarding FILL FACTOR. I observed that our system's loading is a bit slow, and some of the modules take 1 to 2 minutes loading. Maintenance activity is regularly executed based on the scheduled sets. Then I tried to checked the tables indexes/keys turns out that the FILL FACTOR is set to ZERO(0). I would like to know if the FILL FACTOR set to zero will be a factor for the system to slow down..????


Darren Bernabe Blanco

View 2 Replies View Related

Fill Factor

Jul 14, 2006

How do i find out how much fill facot has been spcified in given table?.

View 1 Replies View Related

Fill Factor -discussion

Apr 4, 2001

What are the criteria to decide the optimal(or close to optimal) fill factor?
Any input is appreciated.

View 2 Replies View Related

How To Calculate Fill Factor?

Aug 9, 2001

You have 50,000 records in a database file and you know you want to add another 100,000 records in the next several weeks. What fill factor would you use to maximize performance?
A.0(default setting)
B.30
C.70
D.100
which one is correct? And how to calculate fill factor?

View 1 Replies View Related

Index Fill Factor > 100 !!

Sep 14, 1998

I have some non-clustered , non-unique indexes on a medium sized table (25,000 rows).
The fill factore is showing 248% on these indexes. I have tried setting the fill factor to various values 100% or less. The re build index seems to work, however the est min/avg/max size of the index all show appx 160Kb, whilst the actual size is in excess of 50Mb !!

We run a weekly rebuild of all indexes overnight, without any fill params and following this the fill on these indexes goes back to 248% !

I have also dropped and re-created the index with a fill of 100%, and it has still reverted to 248% following the weekly rebuild.

I have also looked at the server config, and the fill factor there shows a running value of 171% !!, although the current config is set to 0.

The server is stopped every evening, so no way should the config have a value of 171, especially since the max allowed value is 100.

Any advice/assistance would be gratefully received.

View 1 Replies View Related

Fill Factor And Performance

Jun 7, 2002

I know what fill factor is ... and know that I should set it high when I have static data tables (where the data rarely changes) and low when I expect to have page splits ...

but does anyone know what affect on performance this setting has ? I don't quite get what Books Online says about it.

Thanks
Carol

View 1 Replies View Related

What Is Fill Factor For Indexes

Aug 25, 2004

Hi ,


Can u plz tell me what is fill factor and what its role in defining the indexes. It is by default 0% and can be set upto 100%, but what it makes difference if i change the percentage? Where it is exactly impacts? If u know any links then plz forward me.

Thanks And Regards,
Shailesh

View 3 Replies View Related

How To Add 'Fill Factor' In The SQL Script

Oct 13, 2004

I am trying to set up the relationship (Primary Key and Forign Key) in several tables. I would like to find a way also be able to set 'Fill Factor = 90%' in the script. Here is the code that i have so far:

ALTER TABLE Req
ADD CONSTRAINT FK_Req_Bow FOREIGN KEY ( BowID )
REFERENCES Bow ( BowID )

Any help would be greatly appreciated!

J827

View 1 Replies View Related

Fill Factor In Indexing

Feb 21, 2008

Hi there

Is there any such thing that you can find the current Fill Factor for each indexing? The only thing that you have an indication is by looking at DBCC SHOWCONTIF > Scan Density [Best Count:Actual Count].......: 100.00% [0:0] and if this value is not reaching 100% means may have an issue with fill factor ?!!?

Also, how about SQL2000?

Thanks

View 4 Replies View Related

Default Fill Factor

Jul 20, 2005

HiThere are a lot of articles about the fillfactor.I did change the fill factor and that did not work as intended.How do I get back to the default fill factorI am using sp_msforeachtable undocumented database procedureand when the indexes are rebuilt the fill factor that shows upin origfillfactor is the one I am trying to move away fromYour help will be appreciatedVince

View 4 Replies View Related

Fill Factor Confusion

Jul 31, 2007

Turn away pure key zealots
I have a clustered index that starts with an INT IDENTITY(1,1) column and therefore you can only add data to the end of the cluster. What I'm confused about is the relationship between this and the fill factor. In a normal fill factor scenario you'd be worried about inserts causing page splits but if you can only append to this cluster does this mean I should set the factor to 100% even if I'm expecting a large number of inserts? Basically I don't understand what happens when you run out of space on a page on a B-tree if it's based upon an ever increasing number.



View 3 Replies View Related

Attribute 'importance' Factor

Jan 31, 2008

Is there a way to explicitly assign 'weights' or 'importance' factors to attributes and have that to be considered by the association rules and decision trees algorithms during training? I would like to do so without preprocessing the data (In any case, I can't think on a way to assign weight with preprocessing to boolean attributes like 'smoker')

thanks

View 3 Replies View Related

Database Defaulting To Fill Factor = 90

Aug 19, 2002

The tables in my database somehow are getting set with a fill factor of 90. In the properties of the server/Database Setting, the "Fixed" option is unchecked. Last Friday, I reset the each table to have a fill factor of zero, but when I came in today, the tables reset themselves to having a fill factor = 90. Any ideas of why this is happening and how I can stop this? Your help is greatly appreciated.

Mark

View 1 Replies View Related

Clustered Index Fill Factor

Jul 20, 2004

If I have a clustered index on only one column of the table, the column being the primary key and an identity column ( int datatype, Ascending CIDX), then can I go ahead and have the Fill Factor be 100%. I may add more rows at a later date to the table.

Let me know.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved