f2s_table_static_mode¶
Applies to: Oracle, MS SQL, MySql/MariaDB, PostgreSQL Drivers
Syntax¶
set_attribute f2s_table_static_mode of {FileNumber} to {variable}
get_attribute f2s_table_static_mode of {FileNumber} to {variable}
Parameter |
Description |
---|---|
FileNumber |
Number of the file (filename.File_Number) |
variable |
Boolean variable. Static mode for the file. True for static, false for dynamic. Default = false |
Description¶
Activates or deactivates a special table mode where all rows from the table are loaded into a local cache. When active, all searches are done in memory and the actual table is not accessed. The driver does not allow editing of a table in static mode.
When to Use¶
This is a very useful feature especially when a table contains configuration or static information used in calculations, (i.e., Tax Rate tables, etc.) By keeping this table locally in memory, network round trips are saved resulting in significant performance improvements. This attribute is also useful for batch processes that make extensive table IO requests for reading static information.
When not to use¶
Because the entire table is loaded into memory, it is inadvisable to use this on very large tables.
Examples¶
get_attribute
boolean bStatic
Open OrderHea
Get_Attribute f2s_table_static_mode of Orderhea.File_Number to bStatic
set_attribute
Open OrderHea
Set_Attribute f2s_table_static_mode of Orderhea.File_Number to true