Skip to content

Commit

Permalink
Update 6.clear-space.md (#2414)
Browse files Browse the repository at this point in the history
* Update 6.clear-space.md

* Update 6.clear-space.md
  • Loading branch information
abby-cyber committed Dec 23, 2022
1 parent 2d8b39a commit bf0fe57
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docs-2.0/3.ngql-guide/9.space-statements/6.clear-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

`CLEAR SPACE`语句用于清空图空间中的点和边,但不会删除图空间本身以及其中的 Schema 信息。


!!! note

建议在执行`CLEAR SPACE`操作之后,立即执行[`SUBMIT JOB COMPACT`](../../4.job-statements/#submit_job_compact)操作以提升查询性能。需要注意的是,COMPACT 操作可能会影响查询性能,建议在业务低峰期(例如凌晨)执行该操作。

## 权限要求

只有 [God 角色](../../7.data-security/1.authentication/3.role-list.md)的用户可以执行`CLEAR SPACE`语句。
Expand All @@ -13,15 +18,15 @@
- 图空间中的数据量越大,`CLEAR SPACE`消耗的时间越长。如果`CLEAR SPACE`的执行因客户端连接超时而失败,可以增大 [Graph 服务配置](../../5.configurations-and-logs/1.configurations/3.graph-config.md)`storage_client_timeout_ms`参数的值。
-`CLEAR SPACE`的执行过程中,向该图空间写入数据的行为不会被自动禁止。这样的写入行为可能导致`CLEAR SPACE`清除数据不完全,残留的数据也可能受到损坏。

!!! note
!!! note

- 社区版 NebulaGraph 不支持在运行`CLEAR SPACE`的同时禁止写入。
社区版 NebulaGraph 不支持在运行`CLEAR SPACE`的同时禁止写入。

{{ ent.ent_begin }}

!!! enterpriseonly
!!! enterpriseonly

- 企业版 NebulaGraph 支持先运行`SET VARIABLE read_only=true`阻止向 NebulaGraph 写入数据,再运行`CLEAR SPACE`。数据清除成功后运行`SET VARIABLE read_only=false`即可重新允许写入。
企业版 NebulaGraph 支持先运行`SET VARIABLE read_only=true`阻止向 NebulaGraph 写入数据,再运行`CLEAR SPACE`。数据清除成功后运行`SET VARIABLE read_only=false`即可重新允许写入。

{{ ent.ent_end }}

Expand Down

0 comments on commit bf0fe57

Please sign in to comment.