开发者

MySQL indexing compared to SQL Server

开发者 https://www.devze.com 2023-01-30 00:05 出处:网络
Does MySQL have a sysindexes table or am I just thinking of SQL Server? If not, is there 开发者_如何学Goan equivalent indexing feature within MySQL at all? SYS tables are specifically SQL Server; the

Does MySQL have a sysindexes table or am I just thinking of SQL Server? If not, is there 开发者_如何学Goan equivalent indexing feature within MySQL at all?


SYS tables are specifically SQL Server; the ANSI equivalent is INFORMATION_SCHEMA. Part of the reason SYS tables still exist on SQL Server is they sometimes include additional information not in the INFORMATION_SCHEMA tables...

On MySQL, you want to use INFORMATION_SCHEMA.STATISTICS:

SELECT * 
  FROM INFORMATION_SCHEMA.STATISTICS
 WHERE table_name = 'tbl_name'
   AND table_schema = 'db_name'


InnoDB tables can definitely be indexed; not sure about the scope available with ISAM tables. The system information stuff is held in the information schema tables:

http://dev.mysql.com/doc/refman/5.0/en/schemata-table.html

0

精彩评论

暂无评论...
验证码 换一张
取 消