There are 2 forms of target level emulation.
- Dynamic AMP sample-based
The DBS Control information stored in SystemFE.Opt_DBSCtl_Table supports both forms of target level emulation. The two forms are definitely not mutually exclusive: they are meant to be used together as a tool for the precise analysis of production system query plans generated on much smaller test systems.
Environmental cost parameters are constant across a system configuration because there is only one set of environmental cost values per system. Table statistics, on the other hand, are different for each base table and do not vary as a function of system configuration. For example, the cardinality of a given table is the same whether that table is on a two AMP system or a 100 AMP system; however, environmental costs vary considerably depending on the system configuration.
Cost-based target level emulation has two possible forms: static and dynamic.
- Static emulation refers to setting environmental cost parameters at the SYSTEM level. Once set, the cost parameters persist across system restarts and reboots.
- Dynamic emulation refers to setting environmental cost parameters at the IFP (referring to the Parsing Engine or PE), REQUEST, or SESSION levels (see SQL Data Manipulation Language for definitions of what these terms mean in the context of Target Level Emulation).
When you first set cost parameters, they are read dynamically from SystemFE.Opt_Cost_Table and copied to a memory-resident data structure. The Optimizer then initializes its cost parameters from this memory-resident structure dynamically. The cost parameters do not persist across system restarts and reboots.
The advantage of dynamic target level emulation is that multiple users in multiple sessions can simultaneously emulate environmental cost parameters from multiple target systems on the same test system.