Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Update Statistics Maint.plan Job Expand / Collapse
Author
Message
Posted Wednesday, October 13, 2010 11:33 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, June 16, 2014 10:44 AM
Points: 153, Visits: 583
In our one PRD server after User DB Reindex job is done Update Statistics job will start

Update Statistics Maint.plan start around: 11:45PM
ending :11:00AM
it is taking almost like 12 hrs to complete the job.

I splited the Update Statistics Maint.plan into two.
like Update Statistics Maint.plan1 and Update Statistics Maint.plan2
which run parallely
Update Statistics Maint.plan1 is taking like 6hrs 28 min 23 sec
Update Statistics Maint.plan2 is taking like 8 hrs 20 min 35 sec.

they are like 32 user databases: total size is 756.0184936523 gigabytes

how to troubleshoot to decrease the time. what does the Update Statistics Maint.plan do ?

Thanks in advance.
Post #1003837
Posted Thursday, October 14, 2010 4:10 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, December 17, 2014 2:16 AM
Points: 2,840, Visits: 3,983
you can divide heavy transactional DB and less transaction Db and set their job accrodingly like for "heavy" DB daily and for "less Db" weekly OR you can choose full scan or sample scan option , it will also reduce the job execution time.
Refer this link for "update statistics " details http://technet.microsoft.com/en-us/library/ms187348%28SQL.90%29.aspx



-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1004221
Posted Thursday, October 14, 2010 5:36 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 1:14 PM
Points: 40,615, Visits: 37,081
Since it's running after an index rebuild, you only need to update column statistics, not index statistics.

Shouldn't be running that long, I've had TB size databases where the stats update takes maybe an hour. Are you hitting IO bottlenecks perhaps?



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #1004252
Posted Thursday, October 14, 2010 5:41 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, December 17, 2014 2:16 AM
Points: 2,840, Visits: 3,983
GilaMonster (10/14/2010)
Since it's running after an index rebuild, you only need to update column statistics, not index statistics.
Will it get benefit, if we go for first "update statistics" then for "index rebuild/reorganize" ?


-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1004255
Posted Thursday, October 14, 2010 5:52 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 1:14 PM
Points: 40,615, Visits: 37,081
MindOptimizer (10/14/2010)
GilaMonster (10/14/2010)
Since it's running after an index rebuild, you only need to update column statistics, not index statistics.
Will it get benefit, if we go for first "update statistics" then for "index rebuild/reorganize" ?


No.

Either way (before or after) if the update stats does index stats as well as column stats it's wasting time as the rebuild indexes updates index stats.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #1004265
Posted Thursday, October 14, 2010 6:06 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, December 17, 2014 2:16 AM
Points: 2,840, Visits: 3,983
GilaMonster (10/14/2010)
MindOptimizer (10/14/2010)
GilaMonster (10/14/2010)
Since it's running after an index rebuild, you only need to update column statistics, not index statistics.
Will it get benefit, if we go for first "update statistics" then for "index rebuild/reorganize" ?


No.

Either way (before or after) if the update stats does index stats as well as column stats it's wasting time as the rebuild indexes updates index stats.
So what sequence we should keep ? first update statistics or index rebuild/reorganize ?


-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1004273
Posted Thursday, October 14, 2010 6:13 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 1:14 PM
Points: 40,615, Visits: 37,081
Well there's no difference which way around providing you don't have the stats update update the index statistics.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #1004278
Posted Thursday, October 14, 2010 9:50 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, June 16, 2014 10:44 AM
Points: 153, Visits: 583
In all our PRD servers.
Once the Full Backup finishes, I call the Check DB Integrity job from the Full Backup job.
Then the Check DB Integrity job runs and when it finishes it calls the User DB Reindex job.
The User DB Reindex job will call the Update Statistics job.
So I have one job calling the next job.

Now I have issue with Update Statistics is taking to long to complete
as mentioned in my 1st post.

@GilaMonster: How do I troubleshoot hitting IO bottlenecks?
and is there any other way to troubleshoot Update Statistics.
What does the update Statistics job do internally?

@MindOptimizer: thanks for your replay. But i am doing that by spliting the job and run it parallel.
I want how to know trouble shoot do decrease the time.
Thanks for your replays
Post #1004524
Posted Thursday, October 14, 2010 10:38 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 1:14 PM
Points: 40,615, Visits: 37,081
ravz.sqldba (10/14/2010)
Now I have issue with Update Statistics is taking to long to complete
as mentioned in my 1st post.


Since it's running after the index rebuild, make sure that (if it's a maint plan) you have the selection set for column statistics only, not all.

@GilaMonster: How do I troubleshoot hitting IO bottlenecks?


I suggest you open your favourite search engine and do some reading. It's a large topic.

What does the update Statistics job do internally?

Depends what options you're running it with. In essence, reads part or all of a table, calculates distributions of row values and updates the stored histogram.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #1004593
Posted Thursday, October 14, 2010 11:21 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 8:56 AM
Points: 6,748, Visits: 8,545
The maint plan has the "statistics only" option.

Otherwise you might be using something based on:

select  'UPDATE STATISTICS ' + quotename(object_schema_name(object_id)) + '.' + quotename(object_name(object_id)) + ' ' + quotename(name) + ' with fullscan ;'
from sys.stats
where objectpropertyex(object_id,'IsMSShipped') = 0 -- only select user objects
-- statistics only
and ( auto_created = 1
or user_created = 1 )



Johan


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere

- How to post Performance Problems
- How to post data/code to get the best help


- How to prevent a sore throat after hours of presenting ppt ?


"press F1 for solution", "press shift+F1 for urgent solution"


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me but most of the time this is me
Post #1004646
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse