Database Reference
In-Depth Information
Listing 33-1 shows how to obtain a list of the natively-compiled objects loaded into SQL Server memory. It also
returns the list of tables and stored procedures from the database to show the correlation between a DLL file name
and object IDs.
Listing 33-1. Obtaining a list of natively-compiled objects loaded into SQL Server memory
select
s.name + '.' + o.name as [Object Name]
,o.object_id
from
(
select schema_id, name, object_id
from sys.tables
where is_memory_optimized = 1
union all
select schema_id, name, object_id
from sys.procedures
) o join sys.schemas s on
o.schema_id = s.schema_id;
select *
from sys.dm_os_loaded_modules
where description = 'XTP Native DLL';
Figure 33-3 illustrates the output of the code.
Figure 33-3. Natively-compiled objects loaded into SQL Server memory
Natively-Compiled Stored Procedures
Natively-compiled stored procedures are the stored procedures that are compiled into native code. They are extremely
efficient, and they can provide major performance improvements while working with memory-optimized tables, as
compared to interpreted T-SQL statements, which access those tables through the query interop component.
In this chapter, I will reference regular interpreted (non-natively compiled) stored procedures as
T-SQL procedures .
Note
 
 
Search WWH ::




Custom Search