473,503 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how do you know indexes have been fragmented?

kalpesh.s...@gmail.com Feb 1, 6:50 am show options

Newsgroups: comp.databases.informix
From: kalpesh.s...@gmail.com - Find messages by this author
Date: 1 Feb 2005 06:50:21 -0800
Local: Tues, Feb 1 2005 6:50 am
Subject: how do you know indexes have been fragmented
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse

i ran dbcc showcontig on my sql server db and it returned fo*llowing
Table: 'Table1' (1621580815); index ID: 1, database ID: 7
TABLE level scan performed.
- Pages Scanned................................: 4982
- Extents Scanned..............................: 628
- Extent Switches..............................: 627
- Avg. Pages per Extent........................: 7.9
- Scan Density [Best Count:Actual Count].......: 99.20% [623*:628]
- Logical Scan Fragmentation ..................: 0.00%
- Extent Scan Fragmentation ...................: 99.52%
- Avg. Bytes Free per Page.....................: 38.3
- Avg. Page Density (full).....................: 99.53%
Based on searching for info on index defrag it seems my Exte*nt Scan
Fragmentation percentage is not what it should be (0%) . Is *it true
and
if yes how can you be sure that your indexes have been fragm*ented.
If indexes are really fragmented what is the best way withou*t
reindexing(or is that the best way) to defrag the indexes.
Thank you
Kalpesh

Jul 23 '05 #1
3 2717
Which version of SQL Server are you using? Did you run shrink after
rebuilding the index? Does your database have multiple files?

More info can be found in our whitepaper on fragmentation below:

http://www.microsoft.com/technet/pro.../ss2kidbp.mspx

Regards.

--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine

This posting is provided "AS IS" with no warranties, and confers no rights.

<ka**********@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
kalpesh.s...@gmail.com Feb 1, 6:50 am show options

Newsgroups: comp.databases.informix
From: kalpesh.s...@gmail.com - Find messages by this author
Date: 1 Feb 2005 06:50:21 -0800
Local: Tues, Feb 1 2005 6:50 am
Subject: how do you know indexes have been fragmented
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse

i ran dbcc showcontig on my sql server db and it returned fo*llowing
Table: 'Table1' (1621580815); index ID: 1, database ID: 7
TABLE level scan performed.
- Pages Scanned................................: 4982
- Extents Scanned..............................: 628
- Extent Switches..............................: 627
- Avg. Pages per Extent........................: 7.9
- Scan Density [Best Count:Actual Count].......: 99.20% [623*:628]
- Logical Scan Fragmentation ..................: 0.00%
- Extent Scan Fragmentation ...................: 99.52%
- Avg. Bytes Free per Page.....................: 38.3
- Avg. Page Density (full).....................: 99.53%
Based on searching for info on index defrag it seems my Exte*nt Scan
Fragmentation percentage is not what it should be (0%) . Is *it true
and
if yes how can you be sure that your indexes have been fragm*ented.
If indexes are really fragmented what is the best way withou*t
reindexing(or is that the best way) to defrag the indexes.
Thank you
Kalpesh
Jul 23 '05 #2
Paul,

Please correct me if I'm wrong. Kalpesh's output show 0% logical frag
(perfect index scan performance) and 99.5% page density (terrific IO
performance). However the extent frag is 99.5%. Assuming he's on a
RAID disk array or SAN -- should Kalpesh worry about this? Is the
disparity between logical and extent fragmentation -- caused by using
DBCC IndexDefrag? Will DBCC DBReindex make logical and extent
fragmentation more in line with each other?

Thanks.

Jul 23 '05 #3
If his db is spread over multiple files then my feeling is he shouldn't
worry as things look good. I'm assuming he's on SQL 2000.

The disparity isn't anything to do with using indexdefrag as opposed to
rebuild. Simple answer is that the logical and extent fragmentation numbers
shouldn't ever be opposite like that and I can't readily explain it, hence
the questions.

Rebuilding the index isn't guaranteed to fix all the extent fragmentation.
If you have multiple files, extent fragmentation is pretty much meaningless
(as explained in BOL) as the algorithm doesn't take multiple files into
account. On a single file, it depends on the distribution of free space that
will be used to construct the new index.

Regards.

--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine

This posting is provided "AS IS" with no warranties, and confers no rights.

"louis" <lo************@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Paul,

Please correct me if I'm wrong. Kalpesh's output show 0% logical frag
(perfect index scan performance) and 99.5% page density (terrific IO
performance). However the extent frag is 99.5%. Assuming he's on a
RAID disk array or SAN -- should Kalpesh worry about this? Is the
disparity between logical and extent fragmentation -- caused by using
DBCC IndexDefrag? Will DBCC DBReindex make logical and extent
fragmentation more in line with each other?

Thanks.

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1708
by: Jesse Sheidlower | last post by:
After some discussion in a separate thread, I've been trying to get a better understanding of the workings of multiple-column indexes, and think I'm still missing the point. I understand indexing...
2
8641
by: David Sharp | last post by:
I've been doing some experiments with speeding up copying tables of approximately 1 million rows between databases using BCP and BULK INSERT. I noticed that the total time for removing the...
0
1209
by: noelle.bond | last post by:
I tried migrating a database from a standalone SQL Server 2000 on Windows 2003 to a clustered Windows 2003/SQL 2000 Server, and the Full Text indexes will not fully populate. There should be...
9
1876
by: pheonix1t | last post by:
hello, I've been assigned to do performance tuning on an SQL2000 database (around 10GB in size, several instances). So far, I see a single RAID5 array, 4CPU (xeon 700MHZ), 4GB RAM. I see the...
1
1268
by: Johnny Ruin | last post by:
Hi, My application goes through a lengthy data processing phase before it's ready to run. During the DP phase I'm mostly inserting records, afterwards many of my tables will be read only. Is...
5
1595
by: UnixSlaxer | last post by:
Hello, Is there any other way to determine the size of the current indexes and materialized views for a certain database than running DB2-Control-Center, selecting the database, and checking the...
6
1721
by: Tom | last post by:
Given: A binary data file of records. Task: Random access using seekg(). I've never found any documentation stating that the offset from begin file marker is safe on a fragmented file. I've...
0
1176
by: declan.mcardle | last post by:
Hi, Could somebody help me out here please as I can't seem to find results for what I want to do using a Google search and the IBM DBAs have gone home. We're using DB2 V8.1 on z/OS 1.7. ...
2
2349
by: rcamarda | last post by:
With help of others on this group, I've been learning and researching about indexes; an area I neglected. I see I can specify which filegroup I wish to create an index, which the default is...
0
7192
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7064
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7445
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4991
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4665
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1492
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
369
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.