Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Will using a Temp table as working / staging tables reduce the log backup size?


Will using a Temp table as working / staging tables reduce the log backup size?

Author
Message
UncleBoris
UncleBoris
SSC-Enthusiastic
SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)

Group: General Forum Members
Points: 107 Visits: 692
I just want to clarify something.
I am trying to reduce the size of the log file backups created by certain processes at certain times of the day.

I understand logging will and should occur but:

If a process inserts, updates etc data in TEMPDB Temp tables for staging then I assume although this data is logged to the tempdb log file it will not get back up (presumably because the TEMPDB log file is not backed up!).

So my question is: If I get a user that is creating large log files using normal tables as working / staging tables, therefore large log file backups -- can I reduce this by requesting working / staging data be done in TEMPDB temporary tables?

thanks
steveb.
steveb.
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2848 Visits: 7195
rather than put more work on the tempDb, you could create them a dedicated Staging Database and put this in simple mode so that log backups are not needed.
Grant Fritchey
Grant Fritchey
SSCoach
SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)

Group: General Forum Members
Points: 17524 Visits: 32250
Are they inserting data into the regular tables and then updating it in place as part of a single operation?

If so, your approach could possibly work. But what about just eliminating the secondary update process. Figure out all the data and make it a single batch process instead of multi-pass operations?

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
UncleBoris
UncleBoris
SSC-Enthusiastic
SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)

Group: General Forum Members
Points: 107 Visits: 692
rather than put more work on the tempDb, you could create them a dedicated Staging Database and put this in simple mode so that log backups are not needed.


Yes that is a good idea and would probably work

If so, your approach could possibly work. But what about just eliminating the secondary update process. Figure out all the data and make it a single batch process instead of multi-pass operations?


The process is quite complex from a business perspective ie working out loyalty points expiry for various periods and tiers.
So although it may be able to be done in a single batch I guess it has been broken down into many staging tables for debugging / checking reasons.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search