The tag has no usage guidance.

learn more… | top users | synonyms

2
votes
1answer
4k views

SQL Server Rebuild/Reorganize Fragmented Indexes causes CRC error or consistency errors

In our test lab I've been experimenting with different jobs to keep our critical indexes from becoming too fragmented. I'm currently using the approach described here: sys.dm_db_index_physical_stats ...
2
votes
2answers
291 views

avg_page_space_used_in_percent and fill factor

sys.dm_db_index_physical_stats contains column avg_page_space_used_in_percent. How does this fit in with the fill factor of an index? For example: I have index idx_HeaderInfo I create the index ...
2
votes
2answers
617 views

Replacing composite key with surrogate

I have the following table that has a couple of million rows in it and is 99% fragmented virtually all of the time. My plan was to insert a IDENTITY field as a surrogate key to replace the current ...
1
vote
2answers
3k views

What is index fragmentation percent a percentage of?

So I am familiar with the concept of index fragmentation and how to fix it but I'm not really sure of one specific item: When you look at index fragmentation, it's always reported in terms of ...
1
vote
2answers
106 views

Does Clustered Index on GUID create more fragmentation than Non Clustered Index?

I have a simple table: CREATE TABLE [dbo].[UserTestGroups]( [UserTestGroupId] [int] IDENTITY(1,1) NOT NULL, [Token] [nvarchar](100) NOT NULL, [TestId] [bigint] NOT NULL, [Group] [...
1
vote
1answer
259 views

What is fragmenting my index on a table with stable traffic?

I am using Ola Hallengren's solution for optimizing indexes. I run it on Sunday every week. The index has had low fragmentation for the last 6 months and it hasn't needed reorganization. The way it's ...
1
vote
1answer
51 views

Optimising file shrink and index reorganization operations

I'm archiving my SQL tables. So I am shrinking my files (because I need the free space) and re-organising my indexes(to defragment them). I know shrinking a file causes the indexes to be fragmented. ...
1
vote
1answer
40 views

Effect of logical fragmentation of range scan in SQL Server Table

To the best of my knowledge, this is what happens during a range scan of a table for some data when the table has got a clustered index: The lower range is first found out, traced to the leaf node ...
1
vote
1answer
74 views

SQL Server Index, difference between Average fragmentation and Total fragmentation

Using SQL server, If i navigate to a table in the object explorer, go to its indexes, go to its properties, and view the fragmentation tab, the top section has 2 lines for me, the Page fullness in ...
1
vote
3answers
261 views

What is SQL Server 2000 spid -2?

I have a SQL Server 2000 machine that has a pretty big database on it - almost a terabyte in size. There's a particular table that has been a source of some production issues and any attempt to try ...
1
vote
1answer
650 views

Model for Distributed Database [closed]

I want to design a model for a distributed database solution. Are there appropriate tools and approaches? How to include stereotypes for (horizontal) fragments?
1
vote
1answer
469 views

How should I distribute my tables for better performance from fragmentation point of view

I have a database on SQL Server 2008 R2 with about 20 non-indexed tables that are continuously undergoing INSERTs AND DELETEs. There are about 400,000 records @ 4KB/record being inserted or deleted ...
1
vote
1answer
62 views

Options for Index Defragmentations For Critical Tables

I wonder if this is a suitable solution for index defragmentations. scenario is like this; There is a table named 'Events' which is very critical and has 4 indexes which are not done maintenance ...
1
vote
1answer
2k views

MySQL Index Fragmentation

Is there any way to find out the fragmentation of indexes in MySQL ? If such an output can be obtained, it would be helpful to identify which all indexes need to be rebuilt. I'm using MySQL 5.1 on ...
1
vote
1answer
971 views

Defrag or Backup+Restore

I have an MDF file that was autogrown from 1MB to 40GB in 10% increment. The file is heavily fragmented now, and I want to defrag it with minimum downtime. I have a plan that I am not sure will work: ...
1
vote
1answer
786 views

How to Prevent an Ever-Growing index file (MyISAM engine) From Causing Disk Fragmentation in Windows (NTFS partition)?

We have a keep-growing table which using MYISAM storage engine. Almost every half year, this table will crash, and need to be repaired. I checked the defragment result reported by windows ...
1
vote
2answers
226 views

For merge replication, do I need to schedule index maintenance on all sites or just publisher?

I have a very fragmented database that uses merge replication with remote sites. Do I need to schedule index maintenance (reorganize / rebuild) for all sites? Or just on publisher copy?
1
vote
1answer
303 views

Equivalent of MRG_MYISAM in databases other than MySQL? [closed]

Does anyone know if other database have something equivalent to MRG_MYISAM (aka the MERGE table type/storage engine)? I know about fragmenting, but this is not quite the same AFAIK. We're using ...
1
vote
0answers
65 views

Update statistics more often and stop defragmenting indexes

I have several vendor databases that have most (99%) of the tables clustered on GUIDs. Currently we are rebuilding the tables every weekend. Most tables are 80% or more fragmented by this time. ...
1
vote
0answers
76 views

Fragmented clustered primary key (sequential GUID) index after processing - SQL Server

I'm in the process of evaluating a schema change on the primary keys of several of our biggest tables in our software. Till now we used varchar(36) for all of our PKs and FKs and Hibernate generated ...
1
vote
0answers
70 views

Database fragmentation and heap SQL Server

We have critical performance issues with our production database (its around 300 gb size) We have run the following script for a few huge tables : DECLARE @db_id SMALLINT; DECLARE @object_id INT; ...
1
vote
0answers
69 views

Defragmentation of SQL Server 2008 indexes

I am having issues defragmenting indexes. I keep using the various defragmentation methods for defragmenting a SQL Server index such as DBCC INDEXDEFRAG and DBCC DBReIndex, but none seem to be ...
1
vote
2answers
2k views

Difference between partitioning and fragmentation [closed]

I'm trying to learn something about distributed databases and I stumbled upon the concepts of fragmentation and partitioning. It seems to me as if both do the same thing and produce similar results (...
0
votes
1answer
403 views

Rebuild Indexes on SQL Server Standard edition

We have SQL Server 2008 R2 Standard on a Windows Server cluster. I want to defrag all indexes on a database. What is the best approach to disable all connections and allow the rebuild of indexes? ...
0
votes
1answer
38 views

One time database shrink catch-22 solution?

I am developing a plan for SQL Server 2012 EE to properly downsize and type (nchar to char types) some needlessly Unicode nvarchar(max) fields and would like to optimize the database size as part of ...
0
votes
1answer
370 views

What is the significance of root and page level fragmentation in a clustered b-tree index?

In investigating fragmentation on some of our large tables in a SQL Server 2005 database, I was using a query based on sys.dm_db_index_physical_stats. The query returns a row for each level in the b-...
0
votes
1answer
82 views

dm_db_index_physical_stats results inconsistent with actual object properties - what may be the reasons?

SQL Server 2008 RTM (10.0.1600.22) Running a typical index fragmentation report on a table: SELECT OBJECT_NAME(i.OBJECT_ID) AS TableName, i.name AS IndexName, s.index_type_desc, ...
0
votes
1answer
3k views

When to rebuild and when to reorganize indexes [duplicate]

I have been trying to gather information about rebuilding and reorganizing indexes. From stackoverflow page (How Often should the indexes be re-build in sql-server DB?) i got this query : SELECT ...
0
votes
2answers
101 views

How can I defragment tables in MySQL?

I have a database named COUNTY. COUNTY has a fragmented table GEO. I executed OPTIMIZE TABLE GEO against the GEO table, but this returned the error "Table does not support optimize, doing ...
0
votes
1answer
91 views

SQL Server : how can I measure database performance increase after index maintenance?

We are using a SQL Server 2005 database. We currently have no maintenance on our databases indexes. Some of our indexes are showing over 85% fragmentation when looking at the table sys....
0
votes
1answer
101 views

What is the cause of high index fragmentation in SQL server?

We have an application which is using a SQL Server database. As the application is in use for many years, its database is of huge size, resulting in slowness of application. It was noticed that the ...
0
votes
0answers
159 views

Measure fragmentation of a single index?

We are measuring the impact of different defrag approaches that we do one index at a time. How do we query to see fragmentation of a single index, by index name (or table + index). This is on SQL ...
-1
votes
1answer
58 views

Verify this TSQL to find the indexes fragmented over 50%

select OBJECT_SCHEMA_NAME(IPS.object_id) 'schema', OBJECT_NAME(IPS.object_id) as table_name,index_type_desc, round(avg_fragmentation_in_percent,2) 'avg_fragmentation_in_percent', si.name ...