Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 Administration
»
Rebuild Info
19 posts, Page 1 of 2
1
2
»»
Rebuild Info
Rate Topic
Display Mode
Topic Options
Author
Message
OnlyOneRJ
OnlyOneRJ
Posted Wednesday, January 23, 2013 7:04 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, May 09, 2013 9:02 AM
Points: 158,
Visits: 443
When executing the query it shows that the fragmentation in percent is 70%
but after rebuilding the indexes the fragmentation still shows the same
Please help me in understanding it & solving it
************************************
Every Dog has a Tail !!!!!
Post #1410553
GilaMonster
GilaMonster
Posted Wednesday, January 23, 2013 7:12 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 4:15 PM
Points: 37,651,
Visits: 29,903
How big's the index? How many pages?
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 #1410557
OnlyOneRJ
OnlyOneRJ
Posted Wednesday, January 23, 2013 7:13 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, May 09, 2013 9:02 AM
Points: 158,
Visits: 443
Gila, How do i get to know abt it??
can you help me with the query
************************************
Every Dog has a Tail !!!!!
Post #1410561
anthony.green
anthony.green
Posted Wednesday, January 23, 2013 7:15 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
page count column from sys.dm_db_index_physical_stats
also contained on the index properties GUI in SSMS in the fragmentation tab
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
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
Post #1410563
OnlyOneRJ
OnlyOneRJ
Posted Wednesday, January 23, 2013 7:17 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, May 09, 2013 9:02 AM
Points: 158,
Visits: 443
I executed below query where in found the Pages count is 5000
but how big index is it, i didnt come to know
=========================
SELECT
s.[name] AS [Schema],
o.[name] AS [Table],
ips.index_type_desc AS [Index Type],
i.[name] AS [Index Name],
i.is_primary_key AS [Primary Key],
i.is_unique AS [Unique],
ips.index_depth,
i.fill_factor AS [Fill factor],
ips.avg_fragmentation_in_percent,
ips.fragment_count,
ips.avg_fragment_size_in_pages,
ips.page_count,
o.create_date,
o.modify_date
FROM sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL, NULL) ips
INNER JOIN sys.objects o ON ips.object_id = o.object_id
INNER JOIN sys.schemAS s ON o.schema_id = s.schema_id
INNER JOIN sys.indexes i ON i.object_id = ips.object_id
AND i.index_id = ips.index_id
AND ips.avg_fragmentation_in_percent > 40
=========================
Please suggest
************************************
Every Dog has a Tail !!!!!
Post #1410564
Sean Pearce
Sean Pearce
Posted Wednesday, January 23, 2013 7:19 AM
Old Hand
Group: General Forum Members
Last Login: 2 days ago @ 11:42 PM
Points: 339,
Visits: 1,299
Page is 8Kb, so 5000 pages is 40,000Kb.
http://thesqlguy.blogspot.com/
Post #1410566
GilaMonster
GilaMonster
Posted Wednesday, January 23, 2013 7:23 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 4:15 PM
Points: 37,651,
Visits: 29,903
Is it a heap or an index? Is autoshrink on?
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 #1410568
OnlyOneRJ
OnlyOneRJ
Posted Wednesday, January 23, 2013 7:27 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, May 09, 2013 9:02 AM
Points: 158,
Visits: 443
Its Heap & how do i check for Auto Shrink?
************************************
Every Dog has a Tail !!!!!
Post #1410571
OnlyOneRJ
OnlyOneRJ
Posted Wednesday, January 23, 2013 7:30 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, May 09, 2013 9:02 AM
Points: 158,
Visits: 443
In Database Properties Auto Shrink = False
************************************
Every Dog has a Tail !!!!!
Post #1410572
anthony.green
anthony.green
Posted Wednesday, January 23, 2013 7:34 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
If its a heap, you need to do
ALTER TABLE tablename REBUILD
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
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
Post #1410578
« Prev Topic
|
Next Topic »
19 posts, Page 1 of 2
1
2
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.