3.1 Table Properties
3.1.1 Table Type
Basically in AX2012 there are two types of Temporary tables:
InMemory tables | TempDB tables |
Holds data temporarily in client or server tier | Holds data temporarily in database till the scope is valid |
These tables can't be stored in Database | These tables are stored in the database |
Can't apply security | Can apply security |
We cannot use InMemory table buffers | TempDB table buffer can be used in coding |
Capabilities of TempDB Tables:
- Can be joined with other AX tables
- Can be either per company or global.
- Can be used from Enterprise Portal by using .NET Business Connector.
- Can have foreign key columns.
- TempDB tables can be instantiated from the client or server tier.
- Can have indexes columns.
- Can have methods, but cannot override.
- Usa as a query
- Transaction support.
- No configuration key is required.
Limitations of TempDB Tables:
- Cannot be a valid time state table.
- Cannot have any delete actions.
- No Record Level Security (RLS).
- Cannot use the Table browser form.
- Cannot be in a table collection.
- No view support.
InMemory tables:
Instantiated in the active memory of which ever tier the process is running on, either the client or the server tier. InMemory tables are never represented in the database management system.An InMemory table is held in memory until its size reaches 128 KB. The dataset is then written to a disk file on the server tier. The disk file for an InMemory table has the naming convention $tmp<nnnnnnnn>.$$$.
Scope: An InMemory table is instantiated when the first record is inserted. The instantiated InMemory table continues to exist only while a record buffer variable that references the table exists. The memory or disk space for the InMemory table is de-allocated as soon as the record buffer goes out of scope.
[Important Questions]
1. How can you check whether table is a tempDB table or InMemory?
Ans: By calling the isTmpDb and isTmp record buffer method -Returns a value of true orfalse depending on whether the table is temporary.
2. How to convert regular table into In memory table?
Ans: Using setTemp() funtion
No comments:
Post a Comment