微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

mysql查看是否支持分区的方法

小编给大家分享一下mysql查看是否支持分区的方法,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!

MysqL查看是否支持分区的方法:执行【show plugins like '%partiotion%';】语句,如果输出信息【Empty set】,则表示不支持分区。MysqL从5.1版本开始支持分区功能

MysqL从5.1开始支持分区功能

查询命令如下:

MysqL> show plugins like '%partiotion%';
MysqL> show variables like '%partition%';
Empty set (0.00 sec)

如果查询结果显示Empty,表示不支持分区。

但是上面的查询方法只是针对MysqL5.6以下版本。

如果MysqL5.6以及以上版本,需要使用下面的查询命令:

MysqL> show plugins;
+----------------------------+----------+--------------------+---------+---------+
| Name                       | Status   | Type               | Library | License |
+----------------------------+----------+--------------------+---------+---------+
| binlog                     | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| MysqL_native_password      | ACTIVE   | AUTHENTICATION     | NULL    | GPL     |
| MysqL_old_password         | ACTIVE   | AUTHENTICATION     | NULL    | GPL     |
| sha256_password            | ACTIVE   | AUTHENTICATION     | NULL    | GPL     |
| MRG_MYISAM                 | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| MEMORY                     | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| CSV                        | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| MyISAM                     | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| ARCHIVE                    | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| BLACKHOLE                  | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| PERFORMANCE_SCHEMA         | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| FEDERATED                  | disABLED | STORAGE ENGINE     | NULL    | GPL     |
| InnoDB                     | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
| INNODB_TRX                 | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_LOCKS               | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_LOCK_WAITS          | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_CMP                 | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_CMP_RESET           | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_CMPMEM              | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_CMPMEM_RESET        | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_CMP_PER_INDEX       | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_CMP_PER_INDEX_RESET | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_BUFFER_PAGE         | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_BUFFER_PAGE_LRU     | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_BUFFER_POOL_STATS   | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_METRICS             | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_FT_DEFAULT_STOPWORD | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_FT_DELETED          | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_FT_BEING_DELETED    | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_FT_CONfig           | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_FT_INDEX_CACHE      | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_FT_INDEX_TABLE      | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_SYS_TABLES          | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_SYS_TABLESTATS      | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_SYS_INDEXES         | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_SYS_COLUMNS         | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_SYS_FIELDS          | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_SYS_FOREIGN         | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_SYS_FOREIGN_COLS    | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_SYS_TABLESPACES     | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| INNODB_SYS_DATAFILES       | ACTIVE   | informatION SCHEMA | NULL    | GPL     |
| partition                  | ACTIVE   | STORAGE ENGINE     | NULL    | GPL     |
+----------------------------+----------+--------------------+---------+---------+
42 rows in set (0.00 sec)

上面的查询方法显示所有插件,如果有如下内容,表示支持分区。

partition      | ACTIVE   | STORAGE ENGINE     | NULL    | GPL

以上是MysqL查看是否支持分区的方法的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享内容对大家有所帮助,如果还想学习更多知识,欢迎关注编程之家行业资讯频道!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐