Skip to content

Commit 40706cd

Browse files
committed
Review fixes, iteration 3
1 parent fa0e67d commit 40706cd

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

ydb/docs/en/core/concepts/datamodel/view.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# View
22

3-
A view is a query that is treated as if it were a table storing the results of a given query. The view itself contains no data. The content of a view is generated every time you `SELECT` from it. Thus, any changes in the underlying tables are reflected immediately in the view.
3+
A view logically represents a table formed by a given query. The view itself contains no data. The content of a view is generated every time you `SELECT` from it. Thus, any changes in the underlying tables are reflected immediately in the view.
44

55
Views are often used to:
66

@@ -53,7 +53,9 @@ Execution plans of queries containing views are currently cached. It might lead
5353

5454
### Query compilation cache
5555

56-
{{ ydb-short-name }} caches query compilation results on the server side for efficiency. For small queries like `SELECT 1;` compilation can take up to a hundred times more CPU time than the execution. The cache entry is searched by the text of the query and some additional information, such as a user SID.
56+
{{ ydb-short-name }} caches query compilation results on the server side for efficiency. For small queries like `SELECT 1;` compilation can take significantly more time than the execution.
57+
58+
The cache entry is searched by the text of the query and some additional information, such as a user SID.
5759

5860
The cache is automatically updated by {{ ydb-short-name }} to stay on track with the changes made to the objects the query references. However, in the case of views, the cache is not updated in the same transaction in which the object's definition changes. It happens with a little delay.
5961

ydb/docs/en/core/yql/reference/yql-core/syntax/alter-view.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Instead, you can redefine a view by dropping it and recreating it with a differe
1313
DROP VIEW redefined_view;
1414
CREATE VIEW redefined_view ...;
1515
```
16-
Such a query would not be atomic, though.
16+
Please note that the two statements are executed separately, unlike a single `ALTER VIEW` statement. If a view is recreated in this way, it might be possible to observe the view in a deleted state for a brief moment.
1717

1818
## See also
1919

ydb/docs/en/core/yql/reference/yql-core/syntax/create-view.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CREATE VIEW
22

3-
`CREATE VIEW` defines a view with a given query.
3+
`CREATE VIEW` defines a [view](../../concepts/datamodel/view.md) with a given query.
44

55
A view logically represents a table formed by a given query. The view does not physically store the table but executes the query to produce the data whenever the view is accessed.
66

ydb/docs/ru/core/concepts/datamodel/view.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ SELECT * FROM hot_view;
5353

5454
### Кэш результатов компиляции
5555

56-
{{ ydb-short-name }} кэширует результаты компиляции запросов на стороне сервера для большей скорости их выполнения. Для лёгких запросов вида `SELECT 1;` компиляция может длится в 100 раз дольше времени исполнения.
56+
{{ ydb-short-name }} кэширует результаты компиляции запросов на стороне сервера для большей скорости их выполнения. Для лёгких запросов вида `SELECT 1;` компиляция может занимать значительное время по сравнению со временем выполнения запроса.
5757

5858
Запись в кэше ищется по ключу, основа которого - текст запроса (но в нём есть и другие поля, например, ID пользователя).
5959

ydb/docs/ru/core/yql/reference/yql-core/syntax/alter-view.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
DROP VIEW redefined_view;
1414
CREATE VIEW redefined_view ...;
1515
```
16-
Но этот запрос не будет атомарным.
16+
Обратите внимание, что эти две инструкции выполняются отдельно, в отличие от одной инструкции `ALTER VIEW`. При изменении представления таким образом его может быть видно в удалённом состоянии на короткий момент.
1717

1818
## См. также
1919

ydb/docs/ru/core/yql/reference/yql-core/syntax/create-view.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CREATE VIEW
22

3-
`CREATE VIEW` создаёт представление.
3+
`CREATE VIEW` создаёт [представление](../../concepts/datamodel/view.md).
44

55
Представление - это обёртка над `SELECT` запросом, позволяющая обращаться к нему как к таблице, в которую сохранены актуальные результаты выполнения этого запроса. Представление не хранит никаких данных, кроме текста запроса. Чтение из представления аналогично чтению из подзапроса.
66

0 commit comments

Comments
 (0)