Unable to truncate memory optimized table - by Muhammad.Imran

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 793861 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 7/14/2013 7:37:10 AM
Access Restriction Public


This issue is related to memory optimized table once you try to truncate it.
Sign in to post a comment.
Posted by Sunil [MSFT] on 10/27/2013 at 10:58 PM
Correct, the delete will log all the rows so subsequently, the size of log will be larger. Since logging for in-memory table is more efficient (i.e. we combine multiple log records into 1) + no index rows are logged, the impact of logging will not be as severe as for disk-based tables. Trucnate table is something we will consider in the next release

Posted by BKStrelioff on 10/18/2013 at 7:40 PM
I agree that there is a need for TRUNCATE support. It is cumbersome to have to implement/maintain different scripts etc. based on the type of the table.

Also, is there a LOG file issue with DELETE vs TRUNCATE?
Posted by pituach on 8/7/2013 at 10:41 AM
delete take too long if we use DURABILITY = SCHEMA_AND_DATA
i think you should implement TRUNCATE TABLE.
Posted by Jos [MSFT] on 7/15/2013 at 9:54 AM
Thanks for this feedback.

The feature TRUNCATE TABLE is not supported with memory-optimized tables in SQL2014. You can use DELETE FROM instead.

Jos de Bruijn
Program Manager - SQL Server Database Systems