Axapta Code solutions Education and Entertainments Earn Money its Real Experience of knowledge Imortant Weblink collections Fun and Entertainment God thoughts Get Ways to Invest your money Products overview and details
Summary:
re-indexes all the tables using DBCC BREINDEX command.
This goes and re-indexes all the tables and takes about 7 minutes and make an improvement of 10%
Details:
USE DbName_1 --Enter the name of the database you want to reindex totally
DECLARE @TableName varchar(255)
DECLARE TableCursor CURSOR FOR
SELECT YourTableName FROM information_schema.tables
WHERE table_type = 'base table'
OPEN TableCursor
FETCH NEXT FROM TableCursor INTO @TableName
WHILE @@FETCH_STATUS = 0
BEGIN
DBCC DBREINDEX(@TableName,' ',100)
FETCH NEXT FROM TableCursor INTO @TableName
END
CLOSE TableCursor
DEALLOCATE TableCursor
Summary:
re-indexes all the tables using DBCC BREINDEX command.
This goes and re-indexes all the tables and takes about 7 minutes and make an improvement of 10%
Details:
USE DbName_1 --Enter the name of the database you want to reindex totally
DECLARE @TableName varchar(255)
DECLARE TableCursor CURSOR FOR
SELECT YourTableName FROM information_schema.tables
WHERE table_type = 'base table'
OPEN TableCursor
FETCH NEXT FROM TableCursor INTO @TableName
WHILE @@FETCH_STATUS = 0
BEGIN
DBCC DBREINDEX(@TableName,' ',100)
FETCH NEXT FROM TableCursor INTO @TableName
END
CLOSE TableCursor
DEALLOCATE TableCursor
0 comments:
Post a Comment