-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add compact and flush statements (#181)
- Loading branch information
1 parent
1e3fe85
commit 18194b9
Showing
5 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
## COMPACT TABLE | ||
压缩指定的 table,可以指定压缩的目标时间窗口。 | ||
**语法** | ||
```SQL | ||
# 压缩非活跃窗口 | ||
COMPACT TABLE [db.]table_name | ||
# 或者 | ||
COMPACT TABLE [db.]table_name FOR PAST | ||
|
||
# 压缩当前窗口 | ||
COMPACT TABLE [db.]table_name FOR CURRENT | ||
``` | ||
|
||
|
||
## COMPACT PARTITION | ||
压缩指定的 partition,可以指定压缩的目标时间窗口。 | ||
**语法** | ||
```SQL | ||
# 压缩非活跃窗口 | ||
COMPACT PARTITION partition_id | ||
# 或者 | ||
COMPACT PARTITION partition_id FOR PAST | ||
|
||
# 压缩当前窗口 | ||
COMPACT PARTITION partition_id FOR CURRENT | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
## FLUSH TABLE | ||
将指定 table 的内存数据刷到磁盘上。 | ||
**语法** | ||
```SQL | ||
FLUSH TABLE [db.]table_name | ||
``` | ||
|
||
## FLUSH DATABASE | ||
将指定 database 所有 table 的内存数据刷到磁盘上。 | ||
**语法** | ||
```SQL | ||
FLUSH DATABASE db | ||
``` | ||
|
||
## FLUSH NODE | ||
将指定集群节点上的 partition 的内存数据刷到磁盘上。 | ||
**语法** | ||
```SQL | ||
FLUSH NODE name | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
## COMPACT TABLE | ||
压缩指定的 table,可以指定压缩的目标时间窗口。 | ||
**语法** | ||
```SQL | ||
# 压缩非活跃窗口 | ||
COMPACT TABLE [db.]table_name | ||
# 或者 | ||
COMPACT TABLE [db.]table_name FOR PAST | ||
|
||
# 压缩当前窗口 | ||
COMPACT TABLE [db.]table_name FOR CURRENT | ||
``` | ||
|
||
|
||
## COMPACT PARTITION | ||
压缩指定的 partition,可以指定压缩的目标时间窗口。 | ||
**语法** | ||
```SQL | ||
# 压缩非活跃窗口 | ||
COMPACT PARTITION partition_id | ||
# 或者 | ||
COMPACT PARTITION partition_id FOR PAST | ||
|
||
# 压缩当前窗口 | ||
COMPACT PARTITION partition_id FOR CURRENT | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
## FLUSH TABLE | ||
将指定 table 的内存数据刷到磁盘上。 | ||
**语法** | ||
```SQL | ||
FLUSH TABLE [db.]table_name | ||
``` | ||
|
||
## FLUSH DATABASE | ||
将指定 database 所有 table 的内存数据刷到磁盘上。 | ||
**语法** | ||
```SQL | ||
FLUSH DATABASE db | ||
``` | ||
|
||
## FLUSH NODE | ||
将指定集群节点上的 partition 的内存数据刷到磁盘上。 | ||
**语法** | ||
```SQL | ||
FLUSH NODE name | ||
``` |