473,781 Members | 2,280 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how do you know indexes have been fragmented?

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

Newsgroups: comp.databases. informix
From: kalpesh.s...@gm ail.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 2735
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**********@g mail.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
kalpesh.s...@gm ail.com Feb 1, 6:50 am show options

Newsgroups: comp.databases. informix
From: kalpesh.s...@gm ail.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.goo glegroups.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
1724
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 (last_name, first_name) in that order if you'd always be searching last names and only be searching first names in combination. What I'm trying to understand is how you would set up these indexes when you'd always be doing joins with another...
2
8666
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 indexes (non-clustered) and then recreating them after the BULK INSERT was significantly less than just doing the BULK INSERT with the indexes left there, even though I specified TABLOCK. I would have expected SQL Server not to update the index until...
0
1219
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 100s-1000s of entries, but they end up with numbers like 5 and 1. I have tried dropping and rebuilding (and repopulating) the indexes to no avail. When the Microsoft Search tries to crawl the databases, the following event error is generated: "The...
9
1900
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 raid5 as a bottleneck. I'd setup a raid 10 and seperate the logs, database and OS(win2k). The one thing that was a bit odd to me was that I was told this place doesn't use indexes. The company is a house builder. They are pretty
1
1288
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 there anything wrong with dropping indexes used for the DP and setting up clustered indexes afterwards? Can I just declare my clustered indexes and go, or do I have run some kind of statistics ...?
5
1607
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 size of each index individually then sum them up ? (right click on index --> estimated size --> current size). Thanks
6
1748
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 observed how binary files are buffered in the past. But I have never tested against a fragmented file. Perhaps I am paranoid or whatever. Maybe fragmentation is no worse than changing tracks on the drive?
0
1196
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. During my SAP upgrade, some tables have been flagged as needing indexes to be rebuilt.
2
2362
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 Primary. I have more than one drive in my SQL server where I put data and logs on their own logical raid groups. My databases are SIMPLE, so they dont use much, if any logs (none as I understand). I was thinking of adding an additional file to my...
0
9636
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9474
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10306
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9931
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7485
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6727
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
2869
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.