Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Jheds
Starting Member
17 Posts |
Posted - 2007-01-08 : 02:01:44
|
| Hi friends, please guide me as to why will we use these 2 commands.their basic use and what information do we have to check from the results of these commands. and what changes do we have to make? how can we improve performance by using these commands? please also tell me if these commands are to be used in conjunction with other commands.Regards,Jheds |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-01-08 : 02:45:29
|
| The two commands are totally different. DBCC SHOWCONTIG will tell you about how much of your data and indexes are fragmented on the storage whereas DBCC SHOW_STATISTICS gives you information about your index statistics, more specifically selectivity of the index, to understand whether particular index is good or not. I believe while tuning the performance, you should start with optimizing query itself. If you think query is sufficiently optimized, you should look for proper indexes built up and table statistics to be up-to-date. If they are good, then you can take a look at the data fragmentation and I/O overhead.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-01-08 : 02:46:44
|
| I'd add one caveat:Make sure your statistics are up to date before you optimise your query - otherwise the optimiser may be basing its plan on stale statistics and you'll be scratching your head for a long time!Kristen |
 |
|
|
Jheds
Starting Member
17 Posts |
Posted - 2007-01-08 : 03:21:41
|
| after running the DBCC SHOW STATICTICS I analyze which of the indexes are working right based on the selectivity.the selectivity is good if the Density is low .Am I RIGHT or theres something other than this also?Thanks Harsh & Kristen,RegardsAmit |
 |
|
|
|
|
|