mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 09:10:48 +00:00
Update to live view docs.
This commit is contained in:
parent
fd396d1d36
commit
2e113a0faf
@ -136,8 +136,8 @@ CREATE LIVE VIEW [db.]table_name WITH TIMEOUT value_in_sec AND REFRESH value_in_
|
||||
You can use the following settings to control the behaviour of live views.
|
||||
|
||||
- `allow_experimental_live_view` - enable live views. Default `0`.
|
||||
- `live_view_heartbeat_interval` - the heartbeat interval in seconds to indicate live query is alive
|
||||
- `live_view_heartbeat_interval` - the heartbeat interval in seconds to indicate live query is alive. Default `15` seconds.
|
||||
- `max_live_view_insert_blocks_before_refresh` - maximum number of inserted blocks after which
|
||||
mergeable blocks are dropped and query is re-executed. Default `64`.
|
||||
- `temporary_live_view_timeout` - interval after which live view with timeout is deleted. Default `0`.
|
||||
- `periodic_live_view_refresh` - interval after which periodically refreshed live view is forced to refresh. Default `0`.
|
||||
mergeable blocks are dropped and query is re-executed. Default `64` inserts.
|
||||
- `temporary_live_view_timeout` - interval after which live view with timeout is deleted. Default `5` seconds.
|
||||
- `periodic_live_view_refresh` - interval after which periodically refreshed live view is forced to refresh. Default `60` seconds.
|
||||
|
@ -27,7 +27,7 @@ WATCH [db.]live_view
|
||||
|
||||
The virtual `_version` column in the query result indicates the current result version.
|
||||
|
||||
By default, the requested data is returned to the client, while in conjunction with [INSERT INTO](../../../sql-reference/statements/insert-into.md)
|
||||
By default, the requested data is returned to the client, while in conjunction with [INSERT INTO](../../sql-reference/statements/insert-into.md)
|
||||
it can be forwarded to a different table.
|
||||
|
||||
```sql
|
||||
@ -37,7 +37,7 @@ INSERT INTO [db.]table WATCH [db.]live_view ...
|
||||
## EVENTS Clause
|
||||
|
||||
The `EVENTS` clause can be used to obtain a short form of the `WATCH` query
|
||||
where instead of the query result, you will just get the latest query
|
||||
where instead of the query result you will just get the latest query
|
||||
result version.
|
||||
|
||||
```sql
|
||||
@ -47,7 +47,8 @@ WATCH [db.]live_view EVENTS LIMIT 1
|
||||
## LIMIT Clause {#limit-clause}
|
||||
|
||||
The `LIMIT n` clause species the number of updates the `WATCH` query should wait
|
||||
for before terminating. The value of `0`
|
||||
for before terminating. By default there is no limit on the number of updates and therefore
|
||||
the query will not terminate. The value of `0`
|
||||
indicates that the `WATCH` query should not wait for any new query results
|
||||
and therefore will return immediately once query is evaluated.
|
||||
|
||||
@ -59,10 +60,9 @@ WATCH [db.]live_view LIMIT 1
|
||||
|
||||
The `FORMAT` clause works the same way as for the [SELECT](./select/index.md#format-clause).
|
||||
|
||||
### JSONEachRowWithProgress
|
||||
|
||||
The `JSONEachRowWithProgress` format should be used when watching [live view](./create/view.md#live-view)
|
||||
tables over the HTTP interface. The progress messages will be added to the output
|
||||
to keep the long-lived HTTP connection alive until the query result changes.
|
||||
The interval between progress messages is controlled using the [live_view_heartbeat_interval](./create/view.md#live-view-settings) setting.
|
||||
!!! info "Note"
|
||||
The [JSONEachRowWithProgress](../../interfaces/formats/#jsoneachrowwithprogress) format should be used when watching [live view](./create/view.md#live-view)
|
||||
tables over the HTTP interface. The progress messages will be added to the output
|
||||
to keep the long-lived HTTP connection alive until the query result changes.
|
||||
The interval between progress messages is controlled using the [live_view_heartbeat_interval](./create/view.md#live-view-settings) setting.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user