patternMinor
Is there a way to minimally log insert under Always on?
Viewed 0 times
insertlogalwayswayminimallyunderthere
Problem
I have a primary database in
I have a process that is executed each day and insert few millions of records in a table. While the operations continued the transaction log file size is increased dramatically ( from 1 GB to 40 GB).
As I have read I can used some variations of
FULL recovery mode which is part of Always On group. Is there a way to minimally log insert operation under FULL recovery model?I have a process that is executed each day and insert few millions of records in a table. While the operations continued the transaction log file size is increased dramatically ( from 1 GB to 40 GB).
As I have read I can used some variations of
INSERT which are not fully logging the operation but I am concern about the effect of switching the recovery model?Solution
No. Full recovery model is a prerequisite of AlwaysOn Availability groups as per the check list here, and minimally logged operations are only available under Simple or Bulk Logged recovery.
Quote from the Data Loading Performance Guide:
Minimally logged operations are available only if your database is in
bulk-logged or simple recovery mode.
Re trace flag 610, what that added was the ability to do minimally logged inserts to tables with clustered indexes ( and/or non-clustered indexes ) with data already in them. This was not previously available.
The thing to bear in mind about minimally logged transactions as that as soon as a transaction log backup contains one of these, you lose the ability to do point-in-time restore with that backup. So hopefully now you understand why these are not available in Full recovery model
Quote from the Data Loading Performance Guide:
Minimally logged operations are available only if your database is in
bulk-logged or simple recovery mode.
Re trace flag 610, what that added was the ability to do minimally logged inserts to tables with clustered indexes ( and/or non-clustered indexes ) with data already in them. This was not previously available.
The thing to bear in mind about minimally logged transactions as that as soon as a transaction log backup contains one of these, you lose the ability to do point-in-time restore with that backup. So hopefully now you understand why these are not available in Full recovery model
Context
StackExchange Database Administrators Q#82374, answer score: 8
Revisions (0)
No revisions yet.