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»»

Index Performance. Expand / Collapse
Author
Message
Posted Tuesday, December 18, 2012 7:37 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, June 25, 2014 7:02 AM
Points: 75, Visits: 289
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!!
Post #1397797
Posted Tuesday, December 18, 2012 7:52 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:52 PM
Points: 12,928, Visits: 12,346
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)
Post #1397808
Posted Tuesday, December 18, 2012 7:53 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 2:07 PM
Points: 39,883, Visits: 36,230
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 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 #1397810
Posted Tuesday, December 18, 2012 8:01 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, June 25, 2014 7:02 AM
Points: 75, Visits: 289
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?
Post #1397819
Posted Tuesday, December 18, 2012 8:28 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 2:07 PM
Points: 39,883, Visits: 36,230
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 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 #1397841
Posted Wednesday, December 19, 2012 3:44 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, April 16, 2013 8:34 AM
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
Post #1398274
Posted Wednesday, December 19, 2012 4:46 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, June 25, 2014 7:02 AM
Points: 75, Visits: 289
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!
Post #1398309
Posted Wednesday, December 19, 2012 4:50 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 9:00 AM
Points: 4,359, Visits: 6,196
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
Post #1398312
Posted Wednesday, December 19, 2012 5:09 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, June 25, 2014 7:02 AM
Points: 75, Visits: 289
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)
Post #1398324
Posted Wednesday, December 19, 2012 5:51 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 2:07 PM
Points: 39,883, Visits: 36,230
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 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 #1398339
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse