restore log slow after In-Memory OLTP The 2019 Stack Overflow Developer Survey Results Are...
system() function string length limit
Working through the single responsibility principle (SRP) in Python when calls are expensive
Is every episode of "Where are my Pants?" identical?
What is this lever in Argentinian toilets?
Can withdrawing asylum be illegal?
Can a 1st-level character have an ability score above 18?
ELI5: Why do they say that Israel would have been the fourth country to land a spacecraft on the Moon and why do they call it low cost?
How to pronounce 1ターン?
"... to apply for a visa" or "... and applied for a visa"?
Are my PIs rude or am I just being too sensitive?
Windows 10: How to Lock (not sleep) laptop on lid close?
What are these Gizmos at Izaña Atmospheric Research Center in Spain?
The variadic template constructor of my class cannot modify my class members, why is that so?
Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?
What was the last x86 CPU that did not have the x87 floating-point unit built in?
How to split my screen on my Macbook Air?
Do working physicists consider Newtonian mechanics to be "falsified"?
The following signatures were invalid: EXPKEYSIG 1397BC53640DB551
What's the point in a preamp?
Cooking pasta in a water boiler
Was credit for the black hole image misattributed?
How does ice melt when immersed in water?
How is simplicity better than precision and clarity in prose?
how can a perfect fourth interval be considered either consonant or dissonant?
restore log slow after In-Memory OLTP
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Why does restore take a long time?How to restore a filegroup from its backup in SQL ServerUnable to restore (error 3456)Multiple database logs in backup deviceRestore DB scriptRestoring Database, creating new copy and use existing transaction logs for the original backup database to restore the NEW database to be current?What happens when you restore the same transaction log multiple times?We converted a database table to be in-memory and the corresponding memory-optimized filegroup takes 1GB on the diskLog shipping confusionHow to restore a file group from file group backup?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
The issue I have is that once you set a database to support in-memory OLTP tables the time to execute a "restore log" increases significantly; about 100 times slower.
I tested, I thought prudently, the use of In-Memory tables but I did not measure the increase in time to perform a "restore log" command.
On one of our production servers we execute "backup log" every 5 minutes, but the "restore log" command takes 6 minutes after turning on In-Memory OLTP; used to take 2 seconds. Yikes...
And as far as I know there is no way to undo a database once you have set it to support in-memory tables.
Has another one else seen this behavior?
the following is a simple script that duplicates the problem.
--use master
--drop database [TestA]
--drop database [TestABackup]
go
use master
select 'create database', getdate()
create database [TestA] on (name=TestA_dat,filename='D:ZZTempTestA.mdf',size=10) log on (name=TestA_log,filename='D:ZZTempTestA.ldf')
go
select 'backup database', getdate()
backup database [TestA] to disk='D:ZZTempTestA.bak'
go
select 'restore database', getdate()
restore database [TestABackup] from disk='D:ZZTempTestA.bak' with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf'
go
select 'backup log', getdate()
backup log [TestA] to disk='D:ZZTempTestA-001.trn'
go
declare @S datetime
set @S=getdate()
-- this takes less than 1 second
restore log [TestABackup]
from disk='D:ZZTempTestA-001.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf'
select 'restore log ms=',datediff(ms,@S,getdate())
go
select 'alter database memory optimized', getdate()
alter database [TestA] ADD FILEGROUP TestA_mod CONTAINS MEMORY_OPTIMIZED_DATA
alter database [TestA] ADD FILE (name='TestA_mod1', filename='D:ZZTempTestA_mod1') TO FILEGROUP TestA_mod
go
select 'backup log', getdate()
backup log [TestA] to disk='D:ZZTempTestA-002.trn'
go
-- this now takes 4 seconds (for a larger data this will take minutes instead of seconds)
declare @S datetime
set @S=getdate()
restore log [TestABackup]
from disk='D:ZZTempTestA-002.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf',
move 'TestA_mod1' to 'D:ZZTempTestABackup_mod1'
select 'restore log (memoryoptimized) ms=',datediff(ms,@S,getdate())
go
use TestA
select 'create table A memory optimzed', getdate()
create table A (ID [int] IDENTITY (1, 1) NOT NULL PRIMARY KEY NONCLUSTERED) with (MEMORY_OPTIMIZED = ON,DURABILITY = SCHEMA_ONLY)
go
use master
select 'backup log', getdate()
backup log [TestA] to disk='D:ZZTempTestA-003.trn'
go
-- this now takes 5 seconds (for a larger data this will take minutes instead of seconds)
declare @S datetime
set @S=getdate()
restore log [TestABackup]
from disk='D:ZZTempTestA-003.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf',
move 'TestA_mod1' to 'D:ZZTempTestABackup_mod1'
select 'restore log (memoryoptimized with table) ms=',datediff(ms,@S,getdate())
go
use TestA
declare @S datetime
set @S=getdate()
checkpoint
select 'checkpoint ms=',datediff(ms,@S,getdate())
go
use master
select 'backup log-start', getdate()
backup log [TestA] to disk='D:ZZTempTestA-004.trn'
go
declare @S datetime
set @S=getdate()
-- this now takes 5 seconds (for a larger data this will take minutes instead of seconds)
restore log [TestABackup]
from disk='D:ZZTempTestA-004.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf',
move 'TestA_mod1' to 'D:ZZTempTestABackup_mod1'
select 'restore log (memoryoptimized with table) ms=',datediff(ms,@S,getdate())
go
use TestA
-- drop the in-memory table
select 'drop table A', getdate()
drop table A
go
use master
select 'backup log', getdate()
backup log [TestA] to disk='D:ZZTempTestA-005.trn'
go
declare @S datetime
set @S=getdate()
-- still takes 5 seconds (for a larger data this will take minutes instead of seconds)
restore log [TestABackup]
from disk='D:ZZTempTestA-005.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf',
move 'TestA_mod1' to 'D:ZZTempTestABackup_mod1'
select 'restore log (memoryoptimized after drop table) ms=',datediff(ms,@S,getdate())
go
/*
No way to undo this... Please help.
https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/the-memory-optimized-filegroup
Once you create a memory-optimized filegroup, you can only remove it by dropping the database. In a production environment, it is unlikely that you will need to remove the memory-optimized filegroup.
*/
sql-server restore
bumped to the homepage by Community♦ 21 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
The issue I have is that once you set a database to support in-memory OLTP tables the time to execute a "restore log" increases significantly; about 100 times slower.
I tested, I thought prudently, the use of In-Memory tables but I did not measure the increase in time to perform a "restore log" command.
On one of our production servers we execute "backup log" every 5 minutes, but the "restore log" command takes 6 minutes after turning on In-Memory OLTP; used to take 2 seconds. Yikes...
And as far as I know there is no way to undo a database once you have set it to support in-memory tables.
Has another one else seen this behavior?
the following is a simple script that duplicates the problem.
--use master
--drop database [TestA]
--drop database [TestABackup]
go
use master
select 'create database', getdate()
create database [TestA] on (name=TestA_dat,filename='D:ZZTempTestA.mdf',size=10) log on (name=TestA_log,filename='D:ZZTempTestA.ldf')
go
select 'backup database', getdate()
backup database [TestA] to disk='D:ZZTempTestA.bak'
go
select 'restore database', getdate()
restore database [TestABackup] from disk='D:ZZTempTestA.bak' with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf'
go
select 'backup log', getdate()
backup log [TestA] to disk='D:ZZTempTestA-001.trn'
go
declare @S datetime
set @S=getdate()
-- this takes less than 1 second
restore log [TestABackup]
from disk='D:ZZTempTestA-001.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf'
select 'restore log ms=',datediff(ms,@S,getdate())
go
select 'alter database memory optimized', getdate()
alter database [TestA] ADD FILEGROUP TestA_mod CONTAINS MEMORY_OPTIMIZED_DATA
alter database [TestA] ADD FILE (name='TestA_mod1', filename='D:ZZTempTestA_mod1') TO FILEGROUP TestA_mod
go
select 'backup log', getdate()
backup log [TestA] to disk='D:ZZTempTestA-002.trn'
go
-- this now takes 4 seconds (for a larger data this will take minutes instead of seconds)
declare @S datetime
set @S=getdate()
restore log [TestABackup]
from disk='D:ZZTempTestA-002.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf',
move 'TestA_mod1' to 'D:ZZTempTestABackup_mod1'
select 'restore log (memoryoptimized) ms=',datediff(ms,@S,getdate())
go
use TestA
select 'create table A memory optimzed', getdate()
create table A (ID [int] IDENTITY (1, 1) NOT NULL PRIMARY KEY NONCLUSTERED) with (MEMORY_OPTIMIZED = ON,DURABILITY = SCHEMA_ONLY)
go
use master
select 'backup log', getdate()
backup log [TestA] to disk='D:ZZTempTestA-003.trn'
go
-- this now takes 5 seconds (for a larger data this will take minutes instead of seconds)
declare @S datetime
set @S=getdate()
restore log [TestABackup]
from disk='D:ZZTempTestA-003.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf',
move 'TestA_mod1' to 'D:ZZTempTestABackup_mod1'
select 'restore log (memoryoptimized with table) ms=',datediff(ms,@S,getdate())
go
use TestA
declare @S datetime
set @S=getdate()
checkpoint
select 'checkpoint ms=',datediff(ms,@S,getdate())
go
use master
select 'backup log-start', getdate()
backup log [TestA] to disk='D:ZZTempTestA-004.trn'
go
declare @S datetime
set @S=getdate()
-- this now takes 5 seconds (for a larger data this will take minutes instead of seconds)
restore log [TestABackup]
from disk='D:ZZTempTestA-004.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf',
move 'TestA_mod1' to 'D:ZZTempTestABackup_mod1'
select 'restore log (memoryoptimized with table) ms=',datediff(ms,@S,getdate())
go
use TestA
-- drop the in-memory table
select 'drop table A', getdate()
drop table A
go
use master
select 'backup log', getdate()
backup log [TestA] to disk='D:ZZTempTestA-005.trn'
go
declare @S datetime
set @S=getdate()
-- still takes 5 seconds (for a larger data this will take minutes instead of seconds)
restore log [TestABackup]
from disk='D:ZZTempTestA-005.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf',
move 'TestA_mod1' to 'D:ZZTempTestABackup_mod1'
select 'restore log (memoryoptimized after drop table) ms=',datediff(ms,@S,getdate())
go
/*
No way to undo this... Please help.
https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/the-memory-optimized-filegroup
Once you create a memory-optimized filegroup, you can only remove it by dropping the database. In a production environment, it is unlikely that you will need to remove the memory-optimized filegroup.
*/
sql-server restore
bumped to the homepage by Community♦ 21 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
The issue I have is that once you set a database to support in-memory OLTP tables the time to execute a "restore log" increases significantly; about 100 times slower.
I tested, I thought prudently, the use of In-Memory tables but I did not measure the increase in time to perform a "restore log" command.
On one of our production servers we execute "backup log" every 5 minutes, but the "restore log" command takes 6 minutes after turning on In-Memory OLTP; used to take 2 seconds. Yikes...
And as far as I know there is no way to undo a database once you have set it to support in-memory tables.
Has another one else seen this behavior?
the following is a simple script that duplicates the problem.
--use master
--drop database [TestA]
--drop database [TestABackup]
go
use master
select 'create database', getdate()
create database [TestA] on (name=TestA_dat,filename='D:ZZTempTestA.mdf',size=10) log on (name=TestA_log,filename='D:ZZTempTestA.ldf')
go
select 'backup database', getdate()
backup database [TestA] to disk='D:ZZTempTestA.bak'
go
select 'restore database', getdate()
restore database [TestABackup] from disk='D:ZZTempTestA.bak' with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf'
go
select 'backup log', getdate()
backup log [TestA] to disk='D:ZZTempTestA-001.trn'
go
declare @S datetime
set @S=getdate()
-- this takes less than 1 second
restore log [TestABackup]
from disk='D:ZZTempTestA-001.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf'
select 'restore log ms=',datediff(ms,@S,getdate())
go
select 'alter database memory optimized', getdate()
alter database [TestA] ADD FILEGROUP TestA_mod CONTAINS MEMORY_OPTIMIZED_DATA
alter database [TestA] ADD FILE (name='TestA_mod1', filename='D:ZZTempTestA_mod1') TO FILEGROUP TestA_mod
go
select 'backup log', getdate()
backup log [TestA] to disk='D:ZZTempTestA-002.trn'
go
-- this now takes 4 seconds (for a larger data this will take minutes instead of seconds)
declare @S datetime
set @S=getdate()
restore log [TestABackup]
from disk='D:ZZTempTestA-002.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf',
move 'TestA_mod1' to 'D:ZZTempTestABackup_mod1'
select 'restore log (memoryoptimized) ms=',datediff(ms,@S,getdate())
go
use TestA
select 'create table A memory optimzed', getdate()
create table A (ID [int] IDENTITY (1, 1) NOT NULL PRIMARY KEY NONCLUSTERED) with (MEMORY_OPTIMIZED = ON,DURABILITY = SCHEMA_ONLY)
go
use master
select 'backup log', getdate()
backup log [TestA] to disk='D:ZZTempTestA-003.trn'
go
-- this now takes 5 seconds (for a larger data this will take minutes instead of seconds)
declare @S datetime
set @S=getdate()
restore log [TestABackup]
from disk='D:ZZTempTestA-003.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf',
move 'TestA_mod1' to 'D:ZZTempTestABackup_mod1'
select 'restore log (memoryoptimized with table) ms=',datediff(ms,@S,getdate())
go
use TestA
declare @S datetime
set @S=getdate()
checkpoint
select 'checkpoint ms=',datediff(ms,@S,getdate())
go
use master
select 'backup log-start', getdate()
backup log [TestA] to disk='D:ZZTempTestA-004.trn'
go
declare @S datetime
set @S=getdate()
-- this now takes 5 seconds (for a larger data this will take minutes instead of seconds)
restore log [TestABackup]
from disk='D:ZZTempTestA-004.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf',
move 'TestA_mod1' to 'D:ZZTempTestABackup_mod1'
select 'restore log (memoryoptimized with table) ms=',datediff(ms,@S,getdate())
go
use TestA
-- drop the in-memory table
select 'drop table A', getdate()
drop table A
go
use master
select 'backup log', getdate()
backup log [TestA] to disk='D:ZZTempTestA-005.trn'
go
declare @S datetime
set @S=getdate()
-- still takes 5 seconds (for a larger data this will take minutes instead of seconds)
restore log [TestABackup]
from disk='D:ZZTempTestA-005.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf',
move 'TestA_mod1' to 'D:ZZTempTestABackup_mod1'
select 'restore log (memoryoptimized after drop table) ms=',datediff(ms,@S,getdate())
go
/*
No way to undo this... Please help.
https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/the-memory-optimized-filegroup
Once you create a memory-optimized filegroup, you can only remove it by dropping the database. In a production environment, it is unlikely that you will need to remove the memory-optimized filegroup.
*/
sql-server restore
The issue I have is that once you set a database to support in-memory OLTP tables the time to execute a "restore log" increases significantly; about 100 times slower.
I tested, I thought prudently, the use of In-Memory tables but I did not measure the increase in time to perform a "restore log" command.
On one of our production servers we execute "backup log" every 5 minutes, but the "restore log" command takes 6 minutes after turning on In-Memory OLTP; used to take 2 seconds. Yikes...
And as far as I know there is no way to undo a database once you have set it to support in-memory tables.
Has another one else seen this behavior?
the following is a simple script that duplicates the problem.
--use master
--drop database [TestA]
--drop database [TestABackup]
go
use master
select 'create database', getdate()
create database [TestA] on (name=TestA_dat,filename='D:ZZTempTestA.mdf',size=10) log on (name=TestA_log,filename='D:ZZTempTestA.ldf')
go
select 'backup database', getdate()
backup database [TestA] to disk='D:ZZTempTestA.bak'
go
select 'restore database', getdate()
restore database [TestABackup] from disk='D:ZZTempTestA.bak' with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf'
go
select 'backup log', getdate()
backup log [TestA] to disk='D:ZZTempTestA-001.trn'
go
declare @S datetime
set @S=getdate()
-- this takes less than 1 second
restore log [TestABackup]
from disk='D:ZZTempTestA-001.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf'
select 'restore log ms=',datediff(ms,@S,getdate())
go
select 'alter database memory optimized', getdate()
alter database [TestA] ADD FILEGROUP TestA_mod CONTAINS MEMORY_OPTIMIZED_DATA
alter database [TestA] ADD FILE (name='TestA_mod1', filename='D:ZZTempTestA_mod1') TO FILEGROUP TestA_mod
go
select 'backup log', getdate()
backup log [TestA] to disk='D:ZZTempTestA-002.trn'
go
-- this now takes 4 seconds (for a larger data this will take minutes instead of seconds)
declare @S datetime
set @S=getdate()
restore log [TestABackup]
from disk='D:ZZTempTestA-002.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf',
move 'TestA_mod1' to 'D:ZZTempTestABackup_mod1'
select 'restore log (memoryoptimized) ms=',datediff(ms,@S,getdate())
go
use TestA
select 'create table A memory optimzed', getdate()
create table A (ID [int] IDENTITY (1, 1) NOT NULL PRIMARY KEY NONCLUSTERED) with (MEMORY_OPTIMIZED = ON,DURABILITY = SCHEMA_ONLY)
go
use master
select 'backup log', getdate()
backup log [TestA] to disk='D:ZZTempTestA-003.trn'
go
-- this now takes 5 seconds (for a larger data this will take minutes instead of seconds)
declare @S datetime
set @S=getdate()
restore log [TestABackup]
from disk='D:ZZTempTestA-003.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf',
move 'TestA_mod1' to 'D:ZZTempTestABackup_mod1'
select 'restore log (memoryoptimized with table) ms=',datediff(ms,@S,getdate())
go
use TestA
declare @S datetime
set @S=getdate()
checkpoint
select 'checkpoint ms=',datediff(ms,@S,getdate())
go
use master
select 'backup log-start', getdate()
backup log [TestA] to disk='D:ZZTempTestA-004.trn'
go
declare @S datetime
set @S=getdate()
-- this now takes 5 seconds (for a larger data this will take minutes instead of seconds)
restore log [TestABackup]
from disk='D:ZZTempTestA-004.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf',
move 'TestA_mod1' to 'D:ZZTempTestABackup_mod1'
select 'restore log (memoryoptimized with table) ms=',datediff(ms,@S,getdate())
go
use TestA
-- drop the in-memory table
select 'drop table A', getdate()
drop table A
go
use master
select 'backup log', getdate()
backup log [TestA] to disk='D:ZZTempTestA-005.trn'
go
declare @S datetime
set @S=getdate()
-- still takes 5 seconds (for a larger data this will take minutes instead of seconds)
restore log [TestABackup]
from disk='D:ZZTempTestA-005.trn'
with standby='D:ZZTempTestABackup.DAT',
move 'TestA_dat' to 'D:ZZTempTestABackup.mdf',
move 'TestA_log' to 'D:ZZTempTestA2Backup.ldf',
move 'TestA_mod1' to 'D:ZZTempTestABackup_mod1'
select 'restore log (memoryoptimized after drop table) ms=',datediff(ms,@S,getdate())
go
/*
No way to undo this... Please help.
https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/the-memory-optimized-filegroup
Once you create a memory-optimized filegroup, you can only remove it by dropping the database. In a production environment, it is unlikely that you will need to remove the memory-optimized filegroup.
*/
sql-server restore
sql-server restore
edited Jan 22 '18 at 5:35
Mr.Brownstone
10.1k32546
10.1k32546
asked Dec 18 '17 at 17:38
Bruce RobinsonBruce Robinson
161
161
bumped to the homepage by Community♦ 21 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 21 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Not sure it's possible to concur with what you wrote, without knowing how much data was being backed up at various points, as well as the version and edition of SQL Server in use.
I ran the script you posted, and I saw 2x to 3x slower log restore times. When I removed STANDBY from the RESTORE LOG command, performance was greatly improved.
Restoring a log WITH STANDBY is always slower than NORECOVERY, whether In-Memory OLTP is used or not. Sounds like you are perhaps running this scenario for logshipping purposes, not sure. Otherwise, can't think of a reason to have STANDBY on the restore.
If your system is on the busy side, you might consider doing a CHECKPOINT before the log backup, which should speed restore/recovery time.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f193425%2frestore-log-slow-after-in-memory-oltp%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Not sure it's possible to concur with what you wrote, without knowing how much data was being backed up at various points, as well as the version and edition of SQL Server in use.
I ran the script you posted, and I saw 2x to 3x slower log restore times. When I removed STANDBY from the RESTORE LOG command, performance was greatly improved.
Restoring a log WITH STANDBY is always slower than NORECOVERY, whether In-Memory OLTP is used or not. Sounds like you are perhaps running this scenario for logshipping purposes, not sure. Otherwise, can't think of a reason to have STANDBY on the restore.
If your system is on the busy side, you might consider doing a CHECKPOINT before the log backup, which should speed restore/recovery time.
add a comment |
Not sure it's possible to concur with what you wrote, without knowing how much data was being backed up at various points, as well as the version and edition of SQL Server in use.
I ran the script you posted, and I saw 2x to 3x slower log restore times. When I removed STANDBY from the RESTORE LOG command, performance was greatly improved.
Restoring a log WITH STANDBY is always slower than NORECOVERY, whether In-Memory OLTP is used or not. Sounds like you are perhaps running this scenario for logshipping purposes, not sure. Otherwise, can't think of a reason to have STANDBY on the restore.
If your system is on the busy side, you might consider doing a CHECKPOINT before the log backup, which should speed restore/recovery time.
add a comment |
Not sure it's possible to concur with what you wrote, without knowing how much data was being backed up at various points, as well as the version and edition of SQL Server in use.
I ran the script you posted, and I saw 2x to 3x slower log restore times. When I removed STANDBY from the RESTORE LOG command, performance was greatly improved.
Restoring a log WITH STANDBY is always slower than NORECOVERY, whether In-Memory OLTP is used or not. Sounds like you are perhaps running this scenario for logshipping purposes, not sure. Otherwise, can't think of a reason to have STANDBY on the restore.
If your system is on the busy side, you might consider doing a CHECKPOINT before the log backup, which should speed restore/recovery time.
Not sure it's possible to concur with what you wrote, without knowing how much data was being backed up at various points, as well as the version and edition of SQL Server in use.
I ran the script you posted, and I saw 2x to 3x slower log restore times. When I removed STANDBY from the RESTORE LOG command, performance was greatly improved.
Restoring a log WITH STANDBY is always slower than NORECOVERY, whether In-Memory OLTP is used or not. Sounds like you are perhaps running this scenario for logshipping purposes, not sure. Otherwise, can't think of a reason to have STANDBY on the restore.
If your system is on the busy side, you might consider doing a CHECKPOINT before the log backup, which should speed restore/recovery time.
answered Jan 22 '18 at 5:09
NedOtterNedOtter
55628
55628
add a comment |
add a comment |
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f193425%2frestore-log-slow-after-in-memory-oltp%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown