Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Slow queries

Author  Topic 

squarefish
Starting Member

28 Posts

Posted - 2011-11-03 : 06:04:20
Hi there,

I have a table that has 60,000 rows of data deleted and readded every hour due to data updates.

The table has an identity column that goes up to hundreds of millions and when this happens the queries start running really slowly, so every now and then I go into the table, delete the id column save the table and re add it which fixes the problem.

Is there an easier solution to this problem? Can I reindex the table via the ssis package that imports and updates the data??

Help!

Regards

Richard

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2011-11-03 : 06:52:06
proper indexing, rebuild statistics, see if data deletion is REALLY needed, or only an update would do... lots of things to try

http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx
How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

For ultra basic questions, follow these links.
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-11-03 : 07:31:36
thats too many deletions and additions happening so frequently...Out of curiosity, whats the data table is dealing in?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sql-programmers
Posting Yak Master

190 Posts

Posted - 2011-11-10 : 20:24:26
One way to really pin-point the problem is to profile your database. Take a look at...

http://www.sql-programmers.com/Resources/SQLServerProfiler.aspx

SQL Server Programmers and Consultants
http://www.sql-programmers.com/
Go to Top of Page
   

- Advertisement -