Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions ydb/docs/en/core/yql/reference/syntax/pragma.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,17 +429,25 @@ SELECT $foo;
{% endif %}


{% if tech %}
{% if backend_name == "YDB" %}

## YDB

### `ydb.CostBasedOptimization` {#costbasedoptimization}

| Value | Description |
| ------- | ---------------------- |
| on | Cost optimizer is enabled for the current query |
| off | Cost optimizer is disabled for the current query |
| auto | The cost optimizer works in accordance with the current [CostBasedOptimizationLevel](#costbasedoptimizationlevel) level |

### `ydb.CostBasedOptimizationLevel` {#costbasedoptimizationlevel}

| Level | Description |
| ----- | ------------------------ |
| 0 | Cost-based optimizer is disabled. |
| 1 | Cost-based optimizer is disabled, but estimates are computed and available. |
| 2 | Cost-based optimizer is enabled only for queries that include [column-oriented tables](../concepts/glossary.md#column-oriented-table). |
| 2 | Cost-based optimizer is enabled only for queries that include {% if backend_name == "YDB" and oss == true %}[column-oriented tables](../../../concepts/glossary.md#column-oriented-table-column-oriented-table) {% else %} column-oriented tables.{% endif %} |
| 3 | Cost-based optimizer is enabled for all queries, but `LookupJoin` is preferred for row-oriented tables. |
| 4 | Cost-based optimizer is enabled for all queries. |

Expand All @@ -453,8 +461,6 @@ An experimental pragma that allows you to reduce the isolation level of the curr

{% endif %}



{% if tech %}

## Debugging and auxiliary settings {#debug}
Expand All @@ -467,7 +473,7 @@ An experimental pragma that allows you to reduce the isolation level of the curr
| --- | --- |
| Flag | false |

An auxiliary setting for previewing tables in the [HTTP API](../interfaces/http.md) (both for the web interface and console client).
An auxiliary setting for previewing tables in the [HTTP API](../) (both for the web interface and console client).
{% endif %}

### `config.flags("ValidateUdf", "Lazy")`
Expand Down
2 changes: 1 addition & 1 deletion ydb/docs/ru/core/yql/reference/syntax/pragma.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ SELECT $foo;

| Значение | Поведение оптимизатора |
| ------- | ---------------------- |
| on | Cтоимостный оптимизатор выключен для текущего запроса |
| on | Cтоимостный оптимизатор включен для текущего запроса |
| off | Cтоимостный оптимизатор выключен для текущего запроса |
| auto | Cтоимостный оптимизатор работает в соотвествии с текущем уровнем [CostBasedOptimizationLevel](#costbasedoptimizationlevel) |

Expand Down