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


Random index corruption


Random index corruption

Author
Message
reguitti
reguitti
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 34
Hi all,

I'm having random issues of poor performance with a DB of 40 Gb.
It has more than 1200 tables but when I execute a reindex on a table (named MOV_MAG) with over one million or records, the issues are solved for some time, but they return after few weeks.
I don't want to schedule a reindex of that table every day, I would like to find where is the cause of these issues.

Some infos of the server:
It is a virtual machine Installed on hyper-v server
It is a dedicated SQL server, no other software are running
There are 3 dedicated phisical cores for 3 virtual processors.
There are 8Gb of reserved ram, 2gb for the system and 6gb for SQL Server
There are 2 virtual disks drives
The first drive is 30Gb (20Gb used) dedicated for the system (10gb free) running win2008R2
The second drive is 100Gb for the data (60gb used)
There is one virtual network adapter 1000Mbits/s and the phisical adapter is fiber optic.
The DB Server version is MS SQL 2008.
Usually there are 30 users connected.

The DB was started twelve years ago and this issue is started one year ago and I'm still trying to find a solution without results. Sad

Can someone help me please?

Thank you in advance

Claudio (from Italy)
SQL Show
SQL Show
Old Hand
Old Hand (393 reputation)Old Hand (393 reputation)Old Hand (393 reputation)Old Hand (393 reputation)Old Hand (393 reputation)Old Hand (393 reputation)Old Hand (393 reputation)Old Hand (393 reputation)

Group: General Forum Members
Points: 393 Visits: 1078
Why cant you reindex daily? Cant you get maintenance windows for reindexing? Also are you do update stats on this table?
reguitti
reguitti
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 34
I've already scheduled a weekly re index of all this DB and I can do a re index of that table every time I want if it is necessary, but I don't want if I'm not forced to do it, it is a wrong way I guess (or a patch at least).

I don't want to schedule a reindex on daily basis because I assume that a DB index should work correctly when the record is wrote, and not by re indexing a table again and again. I think that it is an useless waste of system resources.

I can get maintenance windows and the updates are done every time a record is wrote but I'm not so sure of the second because I cannot see the software which is writing these records.

Do you have a suggestion to see that?

Thanks
anthony.green
anthony.green
SSCertifiable
SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)

Group: General Forum Members
Points: 6091 Visits: 6069
Index maintenance should be a regular thing, indexes get fragmented for many different reasons, I recommend reading up on indexes and fragmentation, some good links below.

http://www.sqlservercentral.com/stairway/72399/
http://sqlinthewild.co.za/index.php/2008/10/20/what-is-fragmentation/



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
When a question, really isn't a question - Jeff Smith
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger


SQL Show
SQL Show
Old Hand
Old Hand (393 reputation)Old Hand (393 reputation)Old Hand (393 reputation)Old Hand (393 reputation)Old Hand (393 reputation)Old Hand (393 reputation)Old Hand (393 reputation)Old Hand (393 reputation)

Group: General Forum Members
Points: 393 Visits: 1078
You should consider reindexing as per their fragmentation level. Its not a one which we simply decide to do. Please go through links provided by anthony.
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: 47185 Visits: 44356
The post title mentioned corruption, but the contents mention performance. Which is it? Do you have random index corruption or do you have poor performance?

Typically when an index rebuild fixes performance problems, the index fragmentation was not the problem. Often the index rebuild wasn't necessary at all and an update statistics would have sufficed.


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


Jeff Moden
Jeff Moden
SSC-Forever
SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)

Group: General Forum Members
Points: 44990 Visits: 39874
reguitti (12/5/2012)
Hi all,

I'm having random issues of poor performance with a DB of 40 Gb.
It has more than 1200 tables but when I execute a reindex on a table (named MOV_MAG) with over one million or records, the issues are solved for some time, but they return after few weeks.
I don't want to schedule a reindex of that table every day, I would like to find where is the cause of these issues.


That's not index corruption... that's just normal stuff that happens depending on what's going on.

You haven't mentioned... is it a gui, report, or stored procedure task that reindexing supposedly fixes?

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
     Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
reguitti
reguitti
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 34
I use the command
DBCC DBREINDEX(MOV_MAG,' ')
in a scheduled job, using MSSQL management studio gui.

I run it with a weekly schedulation, but I start it "by hand" when the issue appear.

The thing which is giving me some perplexity is that before the upgrade to a new version of the software which is using this DB, there was a complete maintenance plan, running every week (also with reindex) and it was enough for the DB, and the DB has worked flawlessly for more than ten years.

Anyway I will read surely the stairway suggestions and the fragmentation explaination from the links above, and probably I will try to write a job which will be started if the fragmentation will be higher than a percent.

Other suggestions and observations will be appreciated.

Thanks guys!
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: 47185 Visits: 44356
reguitti (12/5/2012)
I use the command
DBCC DBREINDEX(MOV_MAG,' ')


That's deprecated and has been for about 7 years. Look up ALTER INDEX

The thing which is giving me some perplexity is that before the upgrade to a new version of the software which is using this DB, there was a complete maintenance plan, running every week (also with reindex) and it was enough for the DB, and the DB has worked flawlessly for more than ten years.


Data growth.

As I said earlier, I doubt the problem is fragmentation. Far more likely to be statistics-related.


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


sjimmo
sjimmo
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: 3342 Visits: 2816
I'm curious, when did you go to the virtual server? Also, has the database been growing all of this time? Finally, what else is running on the physical server?

Steve Jimmo
Sr DBA
“If we ever forget that we are One Nation Under God, then we will be a Nation gone under." - Ronald Reagan
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