+ -
当前位置:首页 → 问答吧 → mysql数据库性能小问题

mysql数据库性能小问题

时间:2012-10-31

来源:互联网

网站数据库经常坏表。MYISAM。
网站是用zencart做的二次开发。
数据结构基本没动,只是加了少量字段。
下面是表的一些信息,请大家帮我分析一下。
导致上述问题的原因,及防止问题再发生的解决思路或方法。


mysql> show processlist;
+--------+-------------+-----------+------+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+--------+-------------+-----------+------+---------+------+-------+------------------+
| 132342 | witdeals_db | localhost | NULL | Query | 0 | NULL | show processlist |
+--------+-------------+-----------+------+---------+------+-------+------------------+
1 row in set (0.00 sec)

mysql> show status like 'table%';
+-----------------------+---------+
| Variable_name | Value |
+-----------------------+---------+
| Table_locks_immediate | 5326133 |
| Table_locks_waited | 1886 |
+-----------------------+---------+
2 rows in set (0.00 sec)

mysql> show variables like 'cncurrent_insert';
Empty set (0.00 sec)

作者: snipersheep   发布时间: 2012-10-31

mysql> show status;
+-----------------------------------+-----------+
| Variable_name                     | Value     |
+-----------------------------------+-----------+
| Aborted_clients                   | 122       |
| Connections                        | 142312    |
| Innodb_buffer_pool_read_requests  | 19803     |
| Innodb_data_read                  | 3657728   |
| Key_blocks_unused                 | 422645    |
| Key_blocks_used                     | 13105     |
| Key_read_requests                  | 751560908 |
| Key_reads                              | 13139     |
| Key_write_requests                | 402172    |
| Key_writes                            | 126855    |
| Last_query_cost                     | 10.499000 |
| Open_tables                          | 492       |
| Opened_files                      | 1763575   |
| Qcache_free_blocks                      | 20614     |
| Qcache_free_memory                   | 92992704  |
| Qcache_hits                                | 23411531  |
| Qcache_inserts                            | 2641355   |
| Qcache_lowmem_prunes              | 58676     |
| Qcache_not_cached                    | 644923    |
| Qcache_queries_in_cache             | 31005     |
| Qcache_total_blocks                | 82762     |
| Queries                                  | 28472677  |
| Table_locks_immediate             | 5744373   |
| Table_locks_waited                  | 2277      |
| Uptime                                   | 444919    |
| Uptime_since_flush_status        | 444919    |

作者: snipersheep   发布时间: 2012-10-31

这是什么歌情况??

作者: 西岭3105   发布时间: 2012-10-31

为啥老是坏

作者: spy   发布时间: 2012-12-19

什么情况

作者: 武汉小不点   发布时间: 2013-04-02