invantive documentationpart of invantive cloud
Invantive Support ForumsLog In / Sign Up

Low Cost

Syntax

%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    stmt_start((START))
    stmt_start --> stmt_0_0[LOW_COST]
    stmt_0_0 --> stmt_0_1["("]:::quoted
    stmt_0_1 --> stmt_0_2[booleanConstant]
    stmt_0_2 --> stmt_0_3[")"]:::quoted
    stmt_0_3 --> stmt_end((END))

Purpose

The low_cost-hint specifies that the select with the hint must be considered a select with low execution costs. Low execution costs trigger early evaluation during parsing instead of during execution. By default, select statements using solely in memory storage, dummy and data dictionary are considered low cost and evaluated early. The evaluation of all other queries is delayed as long as possible.

The use of the low_cost-hint is recommended when the select is used with an in ( select ... ) syntax and the developer knows beforehand that:

  • the sub query will evaluate quickly,
  • the sub query evaluates to constants only,
  • the use of these values will allow the use of server-side filtering for the outer select.