首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >跳过Y.Z的X块,因为MySQL没有选择索引,而是选择了word_sid_typeindex

跳过Y.Z的X块,因为MySQL没有选择索引,而是选择了word_sid_typeindex
EN

Database Administration用户
提问于 2016-10-05 21:15:09
回答 1查看 587关注 0票数 3

我的环境:

代码语言:javascript
复制
# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.8 (Santiago)
# uname -a
Linux A.B.C 2.6.32-642.4.2.el6.x86_64 #1 SMP Mon Aug 15 02:06:41 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
# rpm -q mysql-server percona-toolkit
mysql-server-5.1.73-7.el6.x86_64
percona-toolkit-2.2.19-1.noarch
# 

我正在运行pt-table-checksum,并得到以下错误:

跳过Y.Z的X块,因为MySQL没有选择索引,而是选择了word_sid_typeindex。

代码语言:javascript
复制
mysql> DESCRIBE search_index;
+-------+------------------+------+-----+---------+-------+
| Field | Type             | Null | Key | Default | Extra |
+-------+------------------+------+-----+---------+-------+
| word  | varchar(50)      | NO   | MUL |         |       |
| sid   | int(10) unsigned | NO   | MUL | 0       |       |
| type  | varchar(16)      | YES  |     | NULL    |       |
| score | float            | YES  |     | NULL    |       |
+-------+------------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

mysql> SHOW TABLE STATUS WHERE Name='search_index'\G;
*************************** 1. row ***************************
           Name: search_index
         Engine: InnoDB
        Version: 10
     Row_format: Compact
           Rows: 3155432
 Avg_row_length: 51
    Data_length: 163250176
Max_data_length: 0
   Index_length: 415514624
      Data_free: 839909376
 Auto_increment: NULL
    Create_time: 2016-09-01 21:14:58
    Update_time: NULL
     Check_time: NULL
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
1 row in set (0.13 sec)

ERROR: 
No query specified

mysql> 

请指点。

EN

回答 1

Database Administration用户

发布于 2016-10-11 10:49:10

这就是我的建议:

  • 运行SHOW INDEXES FROM Y.Z\G
  • 使用--chunk-index选项中基数最高的索引
  • 使用不同的哈希函数--function=md5
  • 使用较小的--chunk-size (例如。200)

或者,在受影响的表上运行分析表以重新计算其统计数据。确保您知道在繁忙的服务器上运行的影响。

票数 1
EN
页面原文内容由Database Administration提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://dba.stackexchange.com/questions/151529

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档