All commands
本文罗列了所有 StarRocks 支持的 SQL 命令,并按照命令的功能进行了分类。
用户账户管理
管理用户、角色、和权限。
- ALTER USER
- CREATE ROLE
- CREATE USER
- DROP ROLE
- DROP USER
- EXECUTE AS
- GRANT
- REVOKE
- SET PASSWORD
- SET PROPERTY
- SHOW AUTHENTICATION
- SHOW GRANTS
- SHOW PROPERTY
- SHOW ROLES
集群管理
管理集群,包括 FE、BE、Compute Node (CN)、资源组 (Resource Group)、存储卷(Storage Volume)、表、Tablet、副本 (Replica)、文件、索引(Index)、变量(Variable)、插件(Plugin)等。
FE,BE,CN,Broker,process
- ADMIN SET CONFIG
- ADMIN SHOW CONFIG
- ALTER SYSTEM
- CANCEL DECOMMISSION
- KILL
- SHOW BACKENDS
- SHOW BROKER
- SHOW COMPUTE NODES
- SHOW FRONTENDS
- SHOW PROC
- SHOW PROCESSLIST
资源组
表,tablet,副本
- ADMIN CANCEL REPAIR TABLE
- ADMIN CHECK TABLET
- ADMIN REPAIR TABLE
- ADMIN SET REPLICA STATUS
- ADMIN SHOW REPLICA DISTRIBUTION
- ADMIN SHOW REPLICA STATUS
- RECOVER
- SHOW TABLE STATUS
文件,索引,变量
- CREATE FILE
- CREATE INDEX
- DROP FILE
- DROP INDEX
- SET (variable)
- SHOW FILE
- SHOW FULL COLUMNS
- SHOW INDEX
- SHOW VARIABLES
SQL 黑名单
插件
导入,导出
Routine load
- ALTER ROUTINE LOAD
- CREATE ROUTINE LOAD
- PAUSE ROUTINE LOAD
- RESUME ROUTINE LOAD
- SHOW ROUTINE LOAD
- SHOW ROUTINE LOAD TASK
- STOP ROUTINE LOAD
其他导入
导出
数据目录 (Catalog),数据库,资源
Catalog
数据库
资源
建表,分区
- ALTER TABLE
- CANCEL ALTER TABLE
- CREATE TABLE
- CREATE TABLE AS SELECT
- CREATE TABLE LIKE
- DROP TABLE
- REFRESH EXTERNAL TABLE
- TRUNCATE TABLE
- DELETE
- SHOW ALTER TABLE
- SHOW CREATE TABLE
- SHOW DELETE
- SHOW DYNAMIC PARTITION TABLES
- SHOW PARTITIONS
- SHOW TABLES
- SHOW TABLET
- UPDATE
视图,物化视图
视图
物化视图
- ALTER MATERIALIZED VIEW
- CREATE MATERIALIZED VIEW
- DROP MATERIALIZED VIEW
- CANCEL REFRESH MATERIALIZED VIEW
- REFRESH MATERIALIZED VIEW
- SHOW ALTER MATERIALIZED VIEW
- SHOW CREATE MATERIALIZED VIEW
- SHOW MATERIALIZED VIEWS
函数,SELECT
CBO 统计信息
- ANALYZE TABLE
- CREATE ANALYZE
- DROP ANALYZE
- DROP STATS
- KILL ANALYZE
- SHOW ANALYZE JOB
- SHOW ANALYZE STATUS
- SHOW META
备份与恢复
- BACKUP
- CANCEL BACKUP
- CANCEL RESTORE
- CREATE REPOSITORY
- DROP REPOSITORY
- RECOVER
- RESTORE
- SHOW BACKUP
- SHOW REPOSITORIES
- SHOW RESTORE
- SHOW SNAPSHOT