Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 6.clear-space.md #2414

Merged
merged 2 commits into from
Dec 23, 2022
Merged
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
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