Monday, August 25, 2014

TableType property in Ax 2012

In Ax- 2012 all tables have TableType property that replaces Temporary property found in Ax-2009.



Regular: The default value. These are permanent Tables.These tables are used for storing data permanently in database.

InMemory: These temporary tables are hosted in the client, the data will wipe out as soon as instance of the form or report is closed.
Joins and other Set operations with InMemory tables are usefull inefficient.
These tables are same thing as what was previously called a temporary table in ax 2009.
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>.$$$.
http://msdn.microsoft.com/EN-US/library/bb314749.aspx

TempDB: This is the new type of temporary table that is hosted in the sql server database.
These temporary tables can be joined in the database with regular tables.
Joins and other Set operations on TempDB tables are can be efficient.This was the joining problem we have InMemory Tables.
http://msdn.microsoft.com/EN-US/library/gg845661.aspx

Difference between InMemory table and Container:
  • Data in containers are stored and retrieved sequentially, but an InMemory table enables you to define indexes to speed up data retrieval.
  • An index is of no benefit if you are working with only a few records. In such cases a container might involve less overhead and perform faster than an InMemory table.
Another important difference between InMemory tables and containers is how they are used in method calls.
When you pass an InMemory table into a method call, it is passed by reference.
Containers are passed by value.
When a variable is passed by reference, only a pointer to the object is passed into the method.
When a variable is passed by value, a new copy of the variable is passed into the method. If the computer has a limited amount of memory, it might start swapping memory to disk, slowing down application execution. When you pass a variable into a method, an InMemory table may provide better performance than a container.


 

No comments:

Post a Comment

Enable/Disable form control based on multiple rows select

 class PurchTableFormEventHandler {      [FormDataSourceEventHandler(formDataSourceStr(PurchTable, PurchTable), FormDataSourceEventType::Act...