简体   繁体   中英

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

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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