RE: Delete Data Without Log
From: mark baekdal (markbaekdal_at_discussions.microsoft.com)
Date: 12/21/04
- Previous message: Mark: "Re: Relation to a table name"
- In reply to: Yash: "Delete Data Without Log"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 21 Dec 2004 00:57:02 -0800
I can tell you how I do it for the fastest way to delete records with the
least amount of logging...
first step is to select all the data I want to keep into a new permanent
table, using select into then I drop any related fks to the original table,
drop the original table, rename the new table and rebuild my indexes, pks and
unique constraints and re-create the foreign keys with nocheck. This can save
alot of time when doing large deletes as there is little logging required - I
always think of the log as something that needs to be recorded in the case of
a rollback - this method means the information regarding individual rows is
not required in the event of a rollback. All of the above I bound within a
transaction.
regards,
Mark Baekdal
www.dbghost.com
+44 (0)208 241 1762
Living and breathing database change management for SQL Server
"Yash" wrote:
> Hi,
> Is there any way to delete specific records from a table with out generating
> the transaction logs.
> --
> Regards,
> Yash
>
- Previous message: Mark: "Re: Relation to a table name"
- In reply to: Yash: "Delete Data Without Log"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|