SQL Server Admin 2014 :: Rebuild Index Disk Space Requirement?
Sep 15, 2015
I'm trying to determine how much space I would need for my data drive and log file drive to do index rebuild. I have a database which is 100gb, it is in simple recovery mode. let me know what to have a look at to determine how much space.
View 7 Replies
Apr 26, 2015
We have a database with a table that contains around 180m records. Each day a further 70k are inserted. No records are ever deleted as this table is used for archiving only.Users are required to perform SELECTs on this table constantly but due to the high number of INSERTs the indexes become very fragmented very quickly. My aim is to avoid daily rebuilds of the indexes which is what our software house is telling us we have to do.
This is the DDL for the table:
CREATE TABLE [dbo].[Inventory](
[EAN] [bigint] NOT NULL,
[Day] [smalldatetime] NOT NULL,
[State] [int] NOT NULL,
[Quantity] [int] NULL,
[StockValue] [float] NULL,
CONSTRAINT [PK_Inventory] PRIMARY KEY CLUSTERED
[code]...
There are also three clustered Indexes on this table each referencing a single column. The problem from my side is that I cannot understand why the three columns in a primary key would also be configured as non-clustered indexes.My solution would be one of the following:
1. Accept the tables are going to be fragmented and require a daily rebuild (don't like this one!)
2. Partition the table
3. Remove the non-clustered Indexes and let the clustered index for the primary key do the work.
View 9 Replies
View Related
Mar 27, 2007
I am running a DB with 250Gb of documents, the fulltext index just keeps growing and growing. The files in the MssearchCatalogDir folder is currently taking up 106Gb, it was only 74Gb this morning. The full text catalog size property says its only 53.6Gb and this is remaining steady while the files in the MssearchCatalogDir folder seem to be balloning out of control. I ran a reorg on the fulltext catalog and it did not alter the file space (actually increased it).
There is one *.ci file that is doing most of the growing, its about three times as big as the second biggest one and is expanding before my eyes.
Should I have turned population off when I did the reorg?
Manamgement studio has an Optimize catalog option on the fulltext catalog properties dialog, is this different from a fulltext catalog reorg? Should I run this.
Should I run a shrink file on the filegroup containing the fulltext catalog (the filegroup itself is very small, all the space is in the MssearchCatalogDir folder)?
I have 140Gb left on this drive, is it just going to keep on expanding until I'm out of room, I just dont know what I should do.
Abit more info.....
I was rebuilding the index from scratch (needed to move it to another filegroup).
When I first started the rebuild, msftesql.exe and msftefd.exe were both taking alot of cpu and the overall cpu usage was high. Now after 12 hours, only msftesql.exe is running and is taking up 5-10% cpu. Could it be that the rebuild is not complete yet? Although the Item Count property of the full text catalog does seem to indicate that all documents have been processed, the processes keeps running and disk space keeps going down.
View 1 Replies
View Related
Nov 13, 2007
-- Initialize Control Mechanism
DECLARE@Drive TINYINT,
@SQL VARCHAR(100)
SET@Drive = 97
-- Setup Staging Area
DECLARE@Drives TABLE
(
Drive CHAR(1),
Info VARCHAR(80)
)
WHILE @Drive <= 122
BEGIN
SET@SQL = 'EXEC XP_CMDSHELL ''fsutil volume diskfree ' + CHAR(@Drive) + ':'''
INSERT@Drives
(
Info
)
EXEC(@SQL)
UPDATE@Drives
SETDrive = CHAR(@Drive)
WHEREDrive IS NULL
SET@Drive = @Drive + 1
END
-- Show the expected output
SELECTDrive,
SUM(CASE WHEN Info LIKE 'Total # of bytes : %' THEN CAST(REPLACE(SUBSTRING(Info, 32, 48), CHAR(13), '') AS BIGINT) ELSE CAST(0 AS BIGINT) END) AS TotalBytes,
SUM(CASE WHEN Info LIKE 'Total # of free bytes : %' THEN CAST(REPLACE(SUBSTRING(Info, 32, 48), CHAR(13), '') AS BIGINT) ELSE CAST(0 AS BIGINT) END) AS FreeBytes,
SUM(CASE WHEN Info LIKE 'Total # of avail free bytes : %' THEN CAST(REPLACE(SUBSTRING(Info, 32, 48), CHAR(13), '') AS BIGINT) ELSE CAST(0 AS BIGINT) END) AS AvailFreeBytes
FROM(
SELECTDrive,
Info
FROM@Drives
WHEREInfo LIKE 'Total # of %'
) AS d
GROUP BYDrive
ORDER BYDrive
E 12°55'05.25"
N 56°04'39.16"
View 16 Replies
View Related
Apr 9, 2008
We had one of the disks in our array fail yesterday morning. The rebuild process using the hot spare went into effect as one would expect. My question is: during this rebuild process, could additional errors be introduced into the database? I'm asking because the current production db has more errors than the restored database from last night.
Msg 8928, Level 16, State 1, Line 3
Object ID 210099789, index ID 255: Page (1:128895) could not be processed. See other errors for details.
Msg 8939, Level 16, State 106, Line 3
Table error: Object ID 210099789, index ID 255, page (1:128895). Test (m_freeCnt == freeCnt) failed. Values are 0 and 8094.
Msg 8939, Level 16, State 108, Line 3
Table error: Object ID 210099789, index ID 255, page (1:128895). Test (emptySlotCnt == 0) failed. Values are 1 and 0.
Msg 8928, Level 16, State 1, Line 3
Object ID 210099789, index ID 255: Page (1:469839) could not be processed. See other errors for details.
Msg 8939, Level 16, State 98, Line 3
Table error: Object ID 210099789, index ID 255, page (1:469839). Test (IS_ON (BUF_IOERR, bp->bstat) &&bp->berrcode) failed. Values are 2057 and -1.
Msg 8928, Level 16, State 1, Line 3
Object ID 210099789, index ID 255: Page (1:469935) could not be processed. See other errors for details.
Msg 8939, Level 16, State 98, Line 3
Table error: Object ID 210099789, index ID 255, page (1:469935). Test (IS_ON (BUF_IOERR, bp->bstat) &&bp->berrcode) failed. Values are 2057 and -1.
Msg 8928, Level 16, State 1, Line 3
Object ID 210099789, index ID 255: Page (1:491535) could not be processed. See other errors for details.
Msg 8939, Level 16, State 98, Line 3
Table error: Object ID 210099789, index ID 255, page (1:491535). Test (IS_ON (BUF_IOERR, bp->bstat) &&bp->berrcode) failed. Values are 2057 and -1.
Msg 8928, Level 16, State 1, Line 3
Object ID 210099789, index ID 255: Page (1:680703) could not be processed. See other errors for details.
Msg 8939, Level 16, State 98, Line 3
Table error: Object ID 210099789, index ID 255, page (1:680703). Test (IS_ON (BUF_IOERR, bp->bstat) &&bp->berrcode) failed. Values are 2057 and -1.
Msg 8928, Level 16, State 1, Line 3
Object ID 210099789, index ID 255: Page (1:762783) could not be processed. See other errors for details.
Msg 8939, Level 16, State 98, Line 3
Table error: Object ID 210099789, index ID 255, page (1:762783). Test (IS_ON (BUF_IOERR, bp->bstat) &&bp->berrcode) failed. Values are 2057 and -1.
CHECKDB found 0 allocation errors and 13 consistency errors in table 'session_state' (object ID 210099789).
Msg 8928, Level 16, State 1, Line 3
Object ID 234028165, index ID 0: Page (1:14175) could not be processed. See other errors for details.
Msg 8944, Level 16, State 17, Line 3
Table error: Object ID 234028165, index ID 0, page (1:14175), row 0. Test (columnOffsets->offTbl [varColumnNumber] <= (nextRec - pRec)) failed. Values are 326 and 300.
Msg 8928, Level 16, State 1, Line 3
Object ID 234028165, index ID 0: Page (1:155583) could not be processed. See other errors for details.
Msg 8944, Level 16, State 12, Line 3
Table error: Object ID 234028165, index ID 0, page (1:155583), row 1. Test (ColumnOffsets <= (nextRec - pRec)) failed. Values are 3840 and 388.
Msg 8928, Level 16, State 1, Line 3
Object ID 234028165, index ID 0: Page (1:179199) could not be processed. See other errors for details.
Msg 8939, Level 16, State 98, Line 3
Table error: Object ID 234028165, index ID 0, page (1:179199). Test (IS_ON (BUF_IOERR, bp->bstat) &&bp->berrcode) failed. Values are 2057 and -1.
Msg 8928, Level 16, State 1, Line 3
Object ID 234028165, index ID 0: Page (1:237663) could not be processed. See other errors for details.
Msg 8944, Level 16, State 12, Line 3
Table error: Object ID 234028165, index ID 0, page (1:237663), row 0. Test (ColumnOffsets <= (nextRec - pRec)) failed. Values are 91 and 26.
Msg 8928, Level 16, State 1, Line 3
Object ID 234028165, index ID 0: Page (1:1060304) could not be processed. See other errors for details.
Msg 8944, Level 16, State 12, Line 3
Table error: Object ID 234028165, index ID 0, page (1:1060304), row 1. Test (ColumnOffsets <= (nextRec - pRec)) failed. Values are 61455 and 397.
Msg 8928, Level 16, State 1, Line 3
Object ID 234028165, index ID 0: Page (1:1392799) could not be processed. See other errors for details.
Msg 8939, Level 16, State 98, Line 3
Table error: Object ID 234028165, index ID 0, page (1:1392799). Test (IS_ON (BUF_IOERR, bp->bstat) &&bp->berrcode) failed. Values are 2057 and -1.
CHECKDB found 0 allocation errors and 12 consistency errors in table 'clientCampaignActivityAll' (object ID 234028165).
View 4 Replies
View Related