It has three dropdown
- Regular
- InMemory
- TempDB
Regular:
The default value. These are permanent Tables. These tables are used for storing data permanently in the database.
InMemory:
- InMemory tables are never represented in the database management system.
- The memory or disk space for the InMemory table is de-allocated as soon as the record buffer goes out of scope.
- To free the memory and delete the file for the InMemory table, set the record buffer variable to null as follows.
custTmpLedger = null;
- The setTmp method is used to create an InMemory table from the Regular table.
- Indexes are useful for quickly retrieving data from InMemory tables, especially if the InMemory table data is in a disk file.
- The following code example copies data from the CustTable table into an InMemory table that is a copy of the CustTable table structure.
static void CopyPersistedTableToInMemoryJob(Args _args)
{
CustTable custTable;
CustTable custTmpLedger;
custTmpLedger.setTmp();
custTable.recordLevelSecurity(true);
while select * from custTable where custTable.AccountNum like '1*'
{
custTmpLedger.data(custTable.data());
custTmpLedger.doInsert();
info(strFmt("Inserted a row for AccountNum = %1",custTable.AccountNum));
}
custTmpLedger = null;
}
TempDB
InMemory tables | TempDB tables |
1. Holds data temporarily in client or server tier | 1. Holds data temporarily in the database until the scope is valid |
2. These tables can't be stored in Database | 2. These tables are stored in the database |
3. Can't apply security | 3. Can apply security |
4. We cannot use InMemory table buffers | 4. TempDB table buffer can be used in coding |
5. SetTmp method to set the regular table to InMemory | 5. linkPhysicalTableInstance method to set the regular table to TempDB |
6. Can't apply joins | 6. Can apply Joins |
No comments:
Post a Comment