SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Performance issues SQL 2012


Performance issues SQL 2012

Author
Message
Rem70Rem
Rem70Rem
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3287 Visits: 745
Hi,

Everyday I truncate a table of roughly 40 millions rows, populate it and re-create the indexes.

If I restart the SQL server just before, the process take a bit more then 1 hour. After a week, the same process takes 2hours. I can't explain why the time of execution is increasing that much.

I think this it the creation of the indexes that takes more time.

Any idea where I can look at?

Thanks
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (146K reputation)SSC Guru (146K reputation)SSC Guru (146K reputation)SSC Guru (146K reputation)SSC Guru (146K reputation)SSC Guru (146K reputation)SSC Guru (146K reputation)SSC Guru (146K reputation)

Group: General Forum Members
Points: 146926 Visits: 13350
Maybe the system is more busy with other tasks when you run the process after a week?


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Rem70Rem
Rem70Rem
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3287 Visits: 745
As far as I know, there is no process running at the same time.
Terry Troisi
Terry Troisi
SSC Veteran
SSC Veteran (202 reputation)SSC Veteran (202 reputation)SSC Veteran (202 reputation)SSC Veteran (202 reputation)SSC Veteran (202 reputation)SSC Veteran (202 reputation)SSC Veteran (202 reputation)SSC Veteran (202 reputation)

Group: General Forum Members
Points: 202 Visits: 143
Maybe after a reboot there aren't any users in your system, where without kicking them off they're creating disk i/o contention as well as lock contention during your index creations?

Either way, there's really nothing in a reboot itself that would decrease disk intensive processing time other than stopping/disconnecting other processes. There must be something else going on with the server during slower times...
Rem70Rem
Rem70Rem
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3287 Visits: 745
This is strange.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (554K reputation)SSC Guru (554K reputation)SSC Guru (554K reputation)SSC Guru (554K reputation)SSC Guru (554K reputation)SSC Guru (554K reputation)SSC Guru (554K reputation)SSC Guru (554K reputation)

Group: General Forum Members
Points: 554462 Visits: 47746
Do the execution plans show any differences? What are the wait types?

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


GilaMonster
GilaMonster
SSC Guru
SSC Guru (554K reputation)SSC Guru (554K reputation)SSC Guru (554K reputation)SSC Guru (554K reputation)SSC Guru (554K reputation)SSC Guru (554K reputation)SSC Guru (554K reputation)SSC Guru (554K reputation)

Group: General Forum Members
Points: 554462 Visits: 47746
Rem70Rem (9/26/2013)
I think this it the creation of the indexes that takes more time.


Think? First thing you need to do is time the steps and see for absolute certain which step is taking longer. Otherwise you're guessing and flailing around blindly

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)

Group: General Forum Members
Points: 223803 Visits: 33566
GilaMonster (9/26/2013)
Rem70Rem (9/26/2013)
I think this it the creation of the indexes that takes more time.


Think? First thing you need to do is time the steps and see for absolute certain which step is taking longer. Otherwise you're guessing and flailing around blindly


Yep! This. Best thing to do is measure and understand what's literally happening with the system rather than guess. When it's running long, what is waiting on, what blocks are occurring, what resources is it using? Answer all these questions and you'll answer, mostly, how to fix it.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Bhuvnesh
Bhuvnesh
SSC-Dedicated
SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)

Group: General Forum Members
Points: 32626 Visits: 4079
Rem70Rem (9/26/2013)
If I restart the SQL server just before, the process take a bit more then 1 hour. After a week, the same process takes 2hours. I can't explain why the time of execution is increasing that much.


Rem70Rem (9/26/2013)
I think this it the creation of the indexes that takes more time.


i dont think above two operations are inter related or linked ... sql server doesnt create or rebuild the indexes unless they are set with startup task (even this is also strange option)

-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search