Hi Gail,
By mistake I have given you wrong table
I am using below statement in sql server to reduce fragmentation
alter index PK_JG_UserLogin on UserLogins rebuild
but in output I always Getting after fragmentation
Table_Name : UserLogins
Index_Name : PK_JG_UserLogin
avg_fragmentation_in_percent : 80
avg_page_space_used_in_percent : 84.20311342
Table_Name : UserLogins
Index_Name : PK_JG_UserLogin
avg_fragmentation_in_percent : 0
avg_page_space_used_in_percent : 1.198418582
As per my knowledge... After fragmentation, I required Value like
Table_Name : UserLogins
Index_Name : PK_JG_UserLogin
avg_fragmentation_in_percent : 0
avg_page_space_used_in_percent : 98.20311342
Table_Name : UserLogins
Index_Name : PK_JG_UserLogin
avg_fragmentation_in_percent : 0
avg_page_space_used_in_percent : 98.198418582
DBCC SHOWCONTIG (UserLogins);
------------------------*/
DBCC SHOWCONTIG scanning 'UserLogins' table...
Table: 'UserLogins' (515532920); index ID: 0, database ID: 5
TABLE level scan performed.
- Pages Scanned................................: 30
- Extents Scanned..............................: 7
- Extent Switches..............................: 6
- Avg. Pages per Extent........................: 4.3
- Scan Density [Best Count:Actual Count].......: 57.14% [4:7]
- Extent Scan Fragmentation ...................: 71.43%
- Avg. Bytes Free per Page.....................: 1762.1
- Avg. Page Density (full).....................: 78.23%
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
----------------------------------------------------------------
ObjectID : 515532920
IndexID : 2
PercentFragment : 0
TotalFrags : 1
PagesPerFrag : 1
NumPages : 1
So, would request you please suggest me why sql is not fragment as per my understanding........because I have read some article.
As per article when value of "avg_fragmentation_in_percent is less" is less than 10 then it will be better and when avg_page_space_used_in_percent is greater than 95 then it will be better.
So if any concept problem please guide me.
Regards,
Sachin.