我必须在 PHP 脚本中从数据库中更新 11M 行。
一段时间后,脚本冻结或崩溃。我必须重新启动 EasyPHP 12,然后重新加载它。
我的配置:
- Windows 7 专业版 64 位
- 英特尔酷睿 i7 860 2.8Ghz
- 8G内存
我的 my.cnf 文件:
port = 3306
socket = /tmp/mysql.sock
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 384M
max_allowed_packet = 1M
table_open_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
thread_concurrency = 8
log-bin=mysql-bin
server-id = 1
[mysqldump]
max_allowed_packet = 16M
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
这是崩溃的伪代码。
`For i to 100000 { do magic (check content on the web); UPDATE table; }`