Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Giant TLog after Reorg

Author  Topic 

andyhro
Starting Member

8 Posts

Posted - 2013-04-02 : 08:18:21
I have a table with 1 billion records
- with a clustered Index (primary key = 54 GB)
- and a non clustered Index (= 40 GB)

At a defragmentation of 10% we start a REORG.
(At a defragmentation of 30% we start REBUILD.)
Unfortunately the TLog is growing on 260 GB while a REORG!
(The Recovery Modell is BULK_LOGGED.)

Can anybody help?






CREATE TABLE [dbo].[AMStatusHistorie](
[typ] [int] NOT NULL,
[objektId] [int] NOT NULL,
[datum] [datetime] NOT NULL,
[mitarbeiter_ID] [int] NOT NULL,
[status] [int] NOT NULL,
[id] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
CONSTRAINT [PK_AmStatusHistorie] PRIMARY KEY CLUSTERED
(
[objektId] ASC,
[typ] ASC,
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO


CREATE NONCLUSTERED INDEX [AMStatusHistorieTypStatusIdx] ON [dbo].[AMStatusHistorie]
(
[typ] ASC,
[status] ASC,
[datum] ASC
)
INCLUDE ( [objektId]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [INDIZES]
GO

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2013-04-03 : 11:57:41
It's tricky when the tables are very large. the Index Rebuild for one table runs as one transaction.Regular transaction log backups can assist - but as mentioned - one table is one transaction.


Read this post for some ideas: http://www.sqlserver-dba.com/2013/04/manage-transaction-logs-during-index-rebuild.html

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2013-04-03 : 12:25:21
Something with a billion rows really needs to be partitioned: http://msdn.microsoft.com/en-us/library/ms190787.aspx
Go to Top of Page
   

- Advertisement -