SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Memory Optimized FileGroups


Memory Optimized FileGroups

Author
Message
smitty-1088185
smitty-1088185
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1937 Visits: 619
In the SQL 2016 documentation it states that you must create a new filegroup called Memory_Optimized_Data ut when I open my database which is SQL 2016 SPK1-CU6 there's
already a filegroup called [Memory Optimized Data] that I did not create and I'm the only DBA that would have. Do I still need to create another filegroup with the same name?
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)

Group: General Forum Members
Points: 347820 Visits: 34125
The name of the filegroup doesn't matter so much as whether or not it was created using CONTAINS MEMORY_OPTIMIZED_DATA.

If so, yeah, that's the one you'll use for your database. If not, regardless of what you call it, you still have to create one.

One HUGE point, you can't delete a memory optimized filegroup after you add it to the database. Don't experiment on production.

----------------------------------------------------
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
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)

Group: General Forum Members
Points: 848231 Visits: 46691
Grant Fritchey - Thursday, February 8, 2018 4:01 PM
One HUGE point, you can't delete a memory optimized filegroup after you add it to the database. Don't experiment on production.

Yowch... that sucks. So much for temporary usage during the night for large ETL jobs. Don't need it or even want it for anything else.

I guess the workaround for me will be to create a temporary "scratch" database, do the work, and then drop that "scratch" database.


--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)

Group: General Forum Members
Points: 347820 Visits: 34125
Jeff Moden - Friday, February 9, 2018 6:39 AM

Yowch... that sucks. So much for temporary usage during the night for large ETL jobs. Don't need it or even want it for anything else.

I guess the workaround for me will be to create a temporary "scratch" database, do the work, and then drop that "scratch" database.


Yeah, it has burned more than a few people. Still, memory optimized tables handy for table variables too. Just saying.

----------------------------------------------------
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
smitty-1088185
smitty-1088185
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1937 Visits: 619

Thank you so much for the reply!

Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)

Group: General Forum Members
Points: 848231 Visits: 46691
Grant Fritchey - Friday, February 9, 2018 8:07 AM
Jeff Moden - Friday, February 9, 2018 6:39 AM

Yowch... that sucks. So much for temporary usage during the night for large ETL jobs. Don't need it or even want it for anything else.

I guess the workaround for me will be to create a temporary "scratch" database, do the work, and then drop that "scratch" database.


Yeah, it has burned more than a few people. Still, memory optimized tables handy for table variables too. Just saying.


I basically forbid the use of Table Variables because of their non-persistent nature for troubleshooting and the single row estimates they normally kick up unless you do a recompile. The only place we use them is where we have to, such as in iTVFs. I'm a bit new to the in-memory thing... is there a way to tell iTVFs to use In_Memory? Is it a simple as creating the iTVFs on the in-memory group?

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)SSC Guru (347K reputation)

Group: General Forum Members
Points: 347820 Visits: 34125
Yeah, you can create the table variables into the In-Memory storage and it really does speed them up a bunch. I wouldn't recommend it for general use for all the reasons you list. However, if you're hitting recompile issues, stuff like that, where table variables MIGHT be useful, then implementing them using In-Memory makes them a lot less painful.

----------------------------------------------------
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
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)SSC Guru (848K reputation)

Group: General Forum Members
Points: 848231 Visits: 46691
Grant Fritchey - Saturday, February 17, 2018 8:49 AM
Yeah, you can create the table variables into the In-Memory storage and it really does speed them up a bunch. I wouldn't recommend it for general use for all the reasons you list. However, if you're hitting recompile issues, stuff like that, where table variables MIGHT be useful, then implementing them using In-Memory makes them a lot less painful.


Cool. Thanks for the lessons, Grant.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
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