品牌网站建设方案,天使二次元WordPress,分类信息网站排行,电子商务网站硬件建设的核心是当前位置:我的异常网 MySQL MYSQL 运作一小段时间后#xff0c;速度变得奇慢。而CPU基本MYSQL 运作一小段时间后#xff0c;速度变得奇慢。而CPU基本空闲状态www.myexceptions.net 网友分享于#xff1a;2015-08-26 浏览#xff1a;11次MYSQL 运行一小段时间后#xff…当前位置:我的异常网» MySQL » MYSQL 运作一小段时间后速度变得奇慢。而CPU基本MYSQL 运作一小段时间后速度变得奇慢。而CPU基本空闲状态www.myexceptions.net 网友分享于2015-08-26 浏览11次MYSQL 运行一小段时间后速度变得奇慢。而CPU基本空闲状态【运行环境】WIN 2003 APACHE2.2 PHP5 MYSQL 5.1.54【服务器配置】双核2.2G主频1.5G内存150G硬盘【数据库情况】1. INNODBibdata 有30G2. 有近2万张表表的字段比较少(基本上10几个字段最多有40个字段)3. 大部分表的记录数不超过3万条只有个别表的记录有百万条的数量级。【数据库使用情况】1. 连接只有几十个其中有几个连接是后台守护程序在用查询和写入的频率很高(类似实时系统)。【问题描述】1. 在MYSQL控制台下面不管是什么操作(查询/更新)都非常慢(一张1万条记录的用户表查记录数都要几秒~几十秒)。而此种情况下mysqld占用约500M内存CPU基本上都是2%(好像不工作)。重启MYSQL后稍微好一点但不一会又开始很慢。对比最奇怪的是之前的速度比较正常mysqld 占用约500M内存CPU占用50%MYSQL查询速度比较OK(都是0.0X秒)。我是MYSQL菜鸟请大虾指教是什么原因附MYSQL配置# MySQL Server Instance Configuration File# ----------------------------------# Generated by the MySQL Server Instance Configuration Wizard### Installation Instructions# ----------------------------------## On Linux you can copy this file to /etc/my.cnf to set global options,# mysql-data-dir/my.cnf to set server-specific options# (localstatedir for this installation) or to# ~/.my.cnf to set user-specific options.## On Windows you should keep this file in the installation directory# of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). To# make sure the server reads the config file use the startup option# --defaults-file.## To run run the server from the command line, execute this in a# command line shell, e.g.# mysqld --defaults-fileC:\Program Files\MySQL\MySQL Server X.Y\my.ini## To install the server as a Windows service manually, execute this in a# command line shell, e.g.# mysqld --install MySQLXY --defaults-fileC:\Program Files\MySQL\MySQL Server X.Y\my.ini## And then execute this in a command line shell to start the server, e.g.# net start MySQLXY### Guildlines for editing this file# ----------------------------------## In this file, you can use all long options that the program supports.# If you want to know the options a program supports, start the program# with the --help option.## More detailed information about the individual options can also be# found in the manual.### CLIENT SECTION# ----------------------------------## The following options will be read by MySQL client applications.# Note that only client applications shipped by MySQL are guaranteed# to read this section. If you want your own MySQL client program to# honor these values, you need to specify it as an option during the# MySQL client library initialization.#[client]port3306[mysql]default-character-setutf8# SERVER SECTION# ----------------------------------## The following options will be read by the MySQL Server. Make sure that# you have installed the server correctly (see above) so it reads this# file.#[mysqld]skip-name-resolve# The TCP/IP Port the MySQL Server will listen onport3306#Path to installation directory. All paths are usually resolved relative to this.basedirC:/Program Files/MySQL/MySQL Server 5.1/#Path to the database rootdatadirD:\Programs\MYSQL\data# The default character set that will be used when a new schema or table is# created and no character set is defineddefault-character-setutf8# The default storage engine that will be used when create new tables whendefault-storage-engineINNODB# Replication Master Server (default)# binary logging is required for replicationlog-binmysql-bin文章评论