Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Index Performance.


Index Performance.

Author
Message
abitguru
abitguru
SSC Journeyman
SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)

Group: General Forum Members
Points: 76 Visits: 290
Hi all,

I search a lot for this issue but I can't realize what happen.

The case is, randomly (no very often, but last two weeks happend) we experiment problems with performance in one particulary index (dont know if there are more)

We can see the performance issue becuase the query using the index is too slow (the table has 25 millon rows)

The problem solves when we re-create the index, but i dont certally know if this is a problem of index corruption.

For some reason we dont update statics (a month ago was last time)-

We use SQL 2008 sp3
1 - Could this be the reason of the index problem?
2 - Is there any way to check why the query is to slow?

Thanks for any help

greetings from argentina!!
Sean Lange
Sean Lange
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16628 Visits: 17024
gheinze (12/18/2012)
Hi all,

I search a lot for this issue but I can't realize what happen.

The case is, randomly (no very often, but last two weeks happend) we experiment problems with performance in one particulary index (dont know if there are more)

We can see the performance issue becuase the query using the index is too slow (the table has 25 millon rows)

The problem solves when we re-create the index, but i dont certally know if this is a problem of index corruption.

For some reason we dont update statics (a month ago was last time)-

We use SQL 2008 sp3
1 - Could this be the reason of the index problem?
2 - Is there any way to check why the query is to slow?

Thanks for any help

greetings from argentina!!


Try updating your statistics. That is almost certainly why your performance jumps all over the place.

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47311 Visits: 44392
Stale statistics. Almost certainly.

It's not corruption. Corruption doesn't cause performance problems. Corruption causes severity 24 error messages.


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


abitguru
abitguru
SSC Journeyman
SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)

Group: General Forum Members
Points: 76 Visits: 290
thanks !!!

in addition, we never see in logs an error about index damage,

we will try scheduling statics,

btw, how often is recomended statics update?
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47311 Visits: 44392
abitguru (12/18/2012)
in addition, we never see in logs an error about index damage,


As I said, it's not going to be corruption. (and one does not depend on the error log anyway to identify corruption in a database)

we will try scheduling statics,

btw, how often is recomended statics update?


You mean 'statistics updates'? Often enough that the queries using the statistics get accurate enough information. Yup, that's about all that can be said.

If you can afford to update stats daily, then do so.


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


peterdru401
peterdru401
Grasshopper
Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)

Group: General Forum Members
Points: 23 Visits: 128
if you have too many indexes, the insert and update performance of your application suffers.

You have to find a balance between the indexing needs of the writes and reads that is based on how your application is used.

so you need to Reorganize indexing & update the stats

follow the below link to update the statistics

http://msdn.microsoft.com/en-us/library/ms187348.aspx
abitguru
abitguru
SSC Journeyman
SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)

Group: General Forum Members
Points: 76 Visits: 290
thanks all for help me.!!

Yesterday we test UPDATE STATISTICS in our dev server (almost size of production). Now we are planing the best way to do in our production server.

Thanks again and greetings from argentina!
TheSQLGuru
TheSQLGuru
SSCertifiable
SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)

Group: General Forum Members
Points: 5998 Visits: 8314
I used statistics updates as frequently as every hour but for most systems that have some "slow/off time" over night then daily is plenty good enough. What usually ISN'T good enough is just letting auto update to the job. 20% mods can be a VERY long wait during which time significant amounts of queries get some bad plans.

Best,

Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru at GMail
abitguru
abitguru
SSC Journeyman
SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)

Group: General Forum Members
Points: 76 Visits: 290
thanks TheSqlGuru for your reply.

We dont use auto update. And is hard to find a "slow/off time" .. you know. We are thinking the best way to schedule to run in spare time.

In our server test takes 14 hours to complete the job. (less resources and almost the same database size)
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47311 Visits: 44392
abitguru (12/19/2012)
We dont use auto update. And is hard to find a "slow/off time" .. you know. We are thinking the best way to schedule to run in spare time.


If you have auto_update off then you must manually maintain your statistics (all of them). With it on, you can get away with just manually updating stats where the 20% threshold is too high.


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


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