简体   繁体   English

是否可以查询MySQL / MariaDB数据库中的索引?

[英]Is it possible to query an index in a MySQL/MariaDB database?

I know that you can tell if an index exists in MySQL with a statement like 我知道您可以使用以下语句判断MySQL中是否存在索引

SHOW INDEX FROM table1;

but is it possible to actually query the index to check the state of the index, eg something along the lines of 但是可以实际查询索引以检查索引的状态,例如沿着

SELECT * FROM <index_name>

And get a result set like you would from a table? 并像从表中那样获得结果集?

No, you cannot query an index in MySQL or MariaDB. 不,您不能在MySQL或MariaDB中查询索引。

You can see statistics of an index - https://dev.mysql.com/doc/refman/5.6/en/statistics-table.html , but you cannot peek into the index. 您可以看到索引的统计信息-https: //dev.mysql.com/doc/refman/5.6/en/statistics-table.html ,但是您无法窥视该索引。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM