Reference to indexes, I have two questions about it.
- If we don't create index file then DBMS will make it default or not ? (It create implicitly if we don't make it explicitly)
- How to see index file ?( I made one index file by using CREATE command and now I want to see that file. How ?)
Note down answers of your queries:
1. No, the database will not make default indexes.
2. (a) To see the index for a specific table use SHOW INDEX: SHOW INDEX FROM yourtable;
(b) If you want to see indexes for all tables within a specific schema you can use the STATISTICS table from INFORMATION_SCHEMA:
SELECT DISTINCT TABLE_NAME, INDEX_NAME
FROM
INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = 'your_schema'; // Removing the where clause will show you all indexes in all schemas.
(c) If you want to see all indexes across all databases all at once:
SELECT * FROM statistics;
0 Comments
Please add nice comments or answer ....