mysql index options_MySQL管理工具MySQL Utilities — mysqlindexcheck (27)

该报告针对ttlsa_com数据库中的多个表进行了索引检查,确认了如bbs_categories, bbs_comments, bbs_favorites等表没有重复或冗余的索引。部分表如bbs_tags_relation缺少唯一或主键索引,并给出了相应的ALTER TABLE建议。警告指出由于数据不足,无法计算最佳/最差索引。
摘要由CSDN通过智能技术生成

# mysqlindexcheck --server=instance_3306 --show-drops --show-indexes --stats --report-indexes -vvv ttlsa_com

# Source on localhost: ... connected.

# Checking indexes...

# Getting indexes for ttlsa_com.bbs_categories

# Showing indexes from ttlsa_com.bbs_categories:

#

+------------+-----------------+----------+--------+---------+----------------+-----------+

| database | table | name | type | unique | accepts nulls | columns |

+------------+-----------------+----------+--------+---------+----------------+-----------+

| ttlsa_com | bbs_categories | PRIMARY | BTREE | True | False | cid, pid |

+------------+-----------------+----------+--------+---------+----------------+-----------+

#

# Table ttlsa_com.bbs_categories has no duplicate nor redundant indexes.

# WARNING: Not enough data to calculate best/worst indexes.

#

# Getting indexes for ttlsa_com.bbs_comments

# Showing indexes from ttlsa_com.bbs_comments:

#

+------------+---------------+----------+--------+---------+----------------+---------------+

| database | table | name | type | unique | accepts nulls | columns |

+------------+---------------+----------+--------+---------+----------------+---------------+

| ttlsa_com | bbs_comments | PRIMARY | BTREE | True | False | id, fid, uid |

+------------+---------------+----------+--------+---------+----------------+---------------+

#

# Table ttlsa_com.bbs_comments has no duplicate nor redundant indexes.

# WARNING: Not enough data to calculate best/worst indexes.

#

# Getting indexes for ttlsa_com.bbs_favorites

# Showing indexes from ttlsa_com.bbs_favorites:

#

+------------+----------------+----------+--------+---------+----------------+----------+

| database | table | name | type | unique | accepts nulls | columns |

+------------+----------------+----------+--------+---------+----------------+----------+

| ttlsa_com | bbs_favorites | PRIMARY | BTREE | True | False | id, uid |

| ttlsa_com | bbs_favorites | uid | BTREE | False | False | uid |

+------------+----------------+----------+--------+---------+----------------+----------+

#

# Table ttlsa_com.bbs_favorites has no duplicate nor redundant indexes.

# WARNING: Not enough data to calculate best/worst indexes.

#

# Getting indexes for ttlsa_com.bbs_forums

# Showing indexes from ttlsa_com.bbs_forums:

#

+------------+-------------+-------------+--------+---------+----------------+----------------+

| database | table | name | type | unique | accepts nulls | columns |

+------------+-------------+-------------+--------+---------+----------------+----------------+

| ttlsa_com | bbs_forums | PRIMARY | BTREE | True | False | fid, cid, uid |

| ttlsa_com | bbs_forums | updatetime | BTREE | False | True | updatetime |

| ttlsa_com | bbs_forums | ord | BTREE | False | False | ord |

+------------+-------------+-------------+--------+---------+----------------+----------------+

#

# Table ttlsa_com.bbs_forums has no duplicate nor redundant indexes.

# WARNING: Not enough data to calculate best/worst indexes.

#

# Getting indexes for ttlsa_com.bbs_links

# Showing indexes from ttlsa_com.bbs_links:

#

+------------+------------+----------+--------+---------+----------------+----------+

| database | table | name | type | unique | accepts nulls | columns |

+------------+------------+----------+--------+---------+----------------+----------+

| ttlsa_com | bbs_links | PRIMARY | BTREE | True | False | id |

+------------+------------+----------+--------+---------+----------------+----------+

#

# Table ttlsa_com.bbs_links has no duplicate nor redundant indexes.

# WARNING: Not enough data to calculate best/worst indexes.

#

# Getting indexes for ttlsa_com.bbs_notifications

# Showing indexes from ttlsa_com.bbs_notifications:

#

+------------+--------------------+----------+--------+---------+----------------+------------+

| database | table | name | type | unique | accepts nulls | columns |

+------------+--------------------+----------+--------+---------+----------------+------------+

| ttlsa_com | bbs_notifications | PRIMARY | BTREE | True | False | nid, nuid |

+------------+--------------------+----------+--------+---------+----------------+------------+

#

# Table ttlsa_com.bbs_notifications has no duplicate nor redundant indexes.

# WARNING: Not enough data to calculate best/worst indexes.

#

# Getting indexes for ttlsa_com.bbs_page

# Showing indexes from ttlsa_com.bbs_page:

#

+------------+-----------+----------+--------+---------+----------------+----------+

| database | table | name | type | unique | accepts nulls | columns |

+------------+-----------+----------+--------+---------+----------------+----------+

| ttlsa_com | bbs_page | PRIMARY | BTREE | True | False | pid |

+------------+-----------+----------+--------+---------+----------------+----------+

#

# Table ttlsa_com.bbs_page has no duplicate nor redundant indexes.

# WARNING: Not enough data to calculate best/worst indexes.

#

# Getting indexes for ttlsa_com.bbs_settings

# Showing indexes from ttlsa_com.bbs_settings:

#

+------------+---------------+----------+--------+---------+----------------+------------------+

| database | table | name | type | unique | accepts nulls | columns |

+------------+---------------+----------+--------+---------+----------------+------------------+

| ttlsa_com | bbs_settings | PRIMARY | BTREE | True | False | id, title, type |

+------------+---------------+----------+--------+---------+----------------+------------------+

#

# Table ttlsa_com.bbs_settings has no duplicate nor redundant indexes.

# WARNING: Not enough data to calculate best/worst indexes.

#

# Getting indexes for ttlsa_com.bbs_tags

# Showing indexes from ttlsa_com.bbs_tags:

#

+------------+-----------+------------+--------+---------+----------------+------------+

| database | table | name | type | unique | accepts nulls | columns |

+------------+-----------+------------+--------+---------+----------------+------------+

| ttlsa_com | bbs_tags | PRIMARY | BTREE | True | False | tag_id |

| ttlsa_com | bbs_tags | tag_title | BTREE | True | False | tag_title |

+------------+-----------+------------+--------+---------+----------------+------------+

#

# Table ttlsa_com.bbs_tags has no duplicate nor redundant indexes.

# WARNING: Not enough data to calculate best/worst indexes.

#

# Getting indexes for ttlsa_com.bbs_tags_relation

# Showing indexes from ttlsa_com.bbs_tags_relation:

#

+------------+--------------------+---------+--------+---------+----------------+----------+

| database | table | name | type | unique | accepts nulls | columns |

+------------+--------------------+---------+--------+---------+----------------+----------+

| ttlsa_com | bbs_tags_relation | tag_id | BTREE | False | False | tag_id |

| ttlsa_com | bbs_tags_relation | fid | BTREE | False | True | fid |

+------------+--------------------+---------+--------+---------+----------------+----------+

#

# Table `ttlsa_com`.`bbs_tags_relation` does not contain neither a PRIMARY nor UNIQUE key.

# The following indexes for table ttlsa_com.bbs_tags_relation contain the clustered index and might be redundant:

#

CREATE INDEX `tag_id` ON `ttlsa_com`.`bbs_tags_relation` (`tag_id`) USING BTREE

#

CREATE INDEX `fid` ON `ttlsa_com`.`bbs_tags_relation` (`fid`) USING BTREE

#

# DROP/ADD statements:

#

ALTER TABLE `ttlsa_com`.`bbs_tags_relation` DROP INDEX `tag_id`, ADD INDEX `tag_id` (tag_id);

ALTER TABLE `ttlsa_com`.`bbs_tags_relation` DROP INDEX `fid`, ADD INDEX `fid` (fid);

#

# WARNING: Not enough data to calculate best/worst indexes.

#

# Getting indexes for ttlsa_com.bbs_users

# Showing indexes from ttlsa_com.bbs_users:

#

+------------+------------+----------+--------+---------+----------------+------------------+

| database | table | name | type | unique | accepts nulls | columns |

+------------+------------+----------+--------+---------+----------------+------------------+

| ttlsa_com | bbs_users | PRIMARY | BTREE | True | False | uid, group_type |

+------------+------------+----------+--------+---------+----------------+------------------+

#

# Table ttlsa_com.bbs_users has no duplicate nor redundant indexes.

# WARNING: Not enough data to calculate best/worst indexes.

#

# Getting indexes for ttlsa_com.bbs_user_follow

# Showing indexes from ttlsa_com.bbs_user_follow:

#

+------------+------------------+----------+--------+---------+----------------+-----------------------------+

| database | table | name | type | unique | accepts nulls | columns |

+------------+------------------+----------+--------+---------+----------------+-----------------------------+

| ttlsa_com | bbs_user_follow | PRIMARY | BTREE | True | False | follow_id, uid, follow_uid |

+------------+------------------+----------+--------+---------+----------------+-----------------------------+

#

# Table ttlsa_com.bbs_user_follow has no duplicate nor redundant indexes.

# WARNING: Not enough data to calculate best/worst indexes.

#

# Getting indexes for ttlsa_com.bbs_user_groups

# Showing indexes from ttlsa_com.bbs_user_groups:

#

+------------+------------------+----------+--------+---------+----------------+------------------+

| database | table | name | type | unique | accepts nulls | columns |

+------------+------------------+----------+--------+---------+----------------+------------------+

| ttlsa_com | bbs_user_groups | PRIMARY | BTREE | True | False | gid, group_type |

+------------+------------------+----------+--------+---------+----------------+------------------+

#

# Table ttlsa_com.bbs_user_groups has no duplicate nor redundant indexes.

# WARNING: Not enough data to calculate best/worst indexes.

#

# Getting indexes for ttlsa_com.data

# Showing indexes from ttlsa_com.data:

#

+------------+--------+----------+--------+---------+----------------+----------+

| database | table | name | type | unique | accepts nulls | columns |

+------------+--------+----------+--------+---------+----------------+----------+

| ttlsa_com | data | PRIMARY | BTREE | True | False | value |

| ttlsa_com | data | id | BTREE | False | False | id |

+------------+--------+----------+--------+---------+----------------+----------+

#

# Table ttlsa_com.data has no duplicate nor redundant indexes.

# WARNING: Not enough data to calculate best/worst indexes.

#

# Getting indexes for ttlsa_com.t_data

# Showing indexes from ttlsa_com.t_data:

#

+------------+---------+----------+--------+---------+----------------+----------+

| database | table | name | type | unique | accepts nulls | columns |

+------------+---------+----------+--------+---------+----------------+----------+

| ttlsa_com | t_data | PRIMARY | BTREE | True | False | value |

| ttlsa_com | t_data | id | BTREE | False | False | id |

+------------+---------+----------+--------+---------+----------------+----------+

#

# Table ttlsa_com.t_data has no duplicate nor redundant indexes.

# WARNING: Not enough data to calculate best/worst indexes.

#

# ...done.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值