patternsqlMinor
Use Natively-Compiled Stored Procedures in disk-based tables
Viewed 0 times
storedprocedurestablescompileddisknativelybaseduse
Problem
Is it completely worthless to use a Natively-Compiled Stored Procedure over disk-based tables? (SQL Server 2016)
Should all the queries inside a Natively-Compiled Stored Procedure point only to in-memory tables? I ask, because I am inserting and updating table T1, but the source for such tasks are disk-based tables.
Should all the queries inside a Natively-Compiled Stored Procedure point only to in-memory tables? I ask, because I am inserting and updating table T1, but the source for such tasks are disk-based tables.
Solution
Natively-compiled stored procedures can only reference:
Sounds like what you want is interop, and that can't be done inside a natively-compiled procedure. If it could, you would be discarding much of the performance benefits of the natively-compiled procedure.
This article is a couple of years old but not much about the core architecture has changed in 2016 / 2017:
- in-memory tables
- in-memory table variables / TVPs
- in-memory natively compiled inline TVFs
Sounds like what you want is interop, and that can't be done inside a natively-compiled procedure. If it could, you would be discarding much of the performance benefits of the natively-compiled procedure.
This article is a couple of years old but not much about the core architecture has changed in 2016 / 2017:
- The Promise – and the Pitfalls – of In-Memory OLTP
Context
StackExchange Database Administrators Q#180172, answer score: 3
Revisions (0)
No revisions yet.