开发者社区> 问答> 正文

帮助语句有哪几类?

SHOW HELP 语句

展示 DRDS 所有辅助 SQL 指令及其说明。

mysql> show help;
+-----------------------------------------+---------------------------------------------------------+---------------------------------------------+
| STATEMENT                               | DESCRIPTION                                             | EXAMPLE                                     |
+-----------------------------------------+---------------------------------------------------------+---------------------------------------------+
| show rule                               | Report all table rule                                   |                                             |
| show rule from TABLE                    | Report table rule                                       | show rule from user                         |
| show full rule from TABLE               | Report table full rule                                  | show full rule from user                    |
| show topology from TABLE                | Report table physical topology                          | show topology from user                     |
| show partitions from TABLE              | Report table dbPartition or tbPartition columns         | show partitions from user                   |
| show broadcasts                         | Report all broadcast tables                             |                                             |
| show datasources                        | Report all partition db threadPool info                 |                                             |
| show node                               | Report master/slave read status                         |                                             |
| show slow                               | Report top 100 slow sql                                 |                                             |
| show physical_slow                      | Report top 100 physical slow sql                        |                                             |
| clear slow                              | Clear slow data                                         |                                             |
| trace SQL                               | Start trace sql, use show trace to print profiling data | trace select count(*) from user; show trace |
| show trace                              | Report sql execute profiling info                       |                                             |
| explain SQL                             | Report sql plan info                                    | explain select count(*) from user           |
| explain detail SQL                      | Report sql detail plan info                             | explain detail select count(*) from user    |
| explain execute SQL                     | Report sql on physical db plan info                     | explain execute select count(*) from user   |
| show sequences                          | Report all sequences status                             |                                             |
| create sequence NAME [start with COUNT] | Create sequence                                         | create sequence test start with 0           |
| alter sequence NAME [start with COUNT]  | Alter sequence                                          | alter sequence test start with 100000       |
| drop sequence NAME                      | Drop sequence                                           | drop sequence test                          |
+-----------------------------------------+---------------------------------------------------------+---------------------------------------------+
20 rows in set (0.00 sec)

展开
收起
猫饭先生 2017-10-30 13:40:29 1574 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载