Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
562 views
in Technique[技术] by (71.8m points)

mysql - 大型MyISAM表中的MySQL基本更新查询太慢(MySQL basic update query in large-ish MyISAM table too slow)

UPDATE SomeTable SET X = null, Y = null in a (61 million rows, 6.4 GB, MyISAM) table takes about 55 minutes .

(UPDATE SomeTable SET X = null, Y = null (在6100万行,6.4 GB,MyISAM表中) UPDATE SomeTable SET X = null, Y = null大约需要55分钟 。)

(MySQL 5.7, Windows 10 on i7 laptop, mains cable plugged in, MySQL running at about 30% CPU).

((MySQL 5.7,i7笔记本电脑上的Windows 10,已插入电源线,MySQL运行约30%的CPU)。)

Columns X and Y are not part of any index.

(X和Y列属于任何索引。)

(I needed to run this query to null some previously entered erroneous data.)

((我需要运行此查询以使一些以前输入的错误数据为空。))

But: ALTER TABLE SomeTable ADD COLUMN X FLOAT NULL DEFAULT NULL, ADD COLUMN Y FLOAT NULL DEFAULT NULL , which requires a complete read/write of table plus index takes only about 15 minutes.

(但是: ALTER TABLE SomeTable ADD COLUMN X FLOAT NULL DEFAULT NULL, ADD COLUMN Y FLOAT NULL DEFAULT NULL ,这需要对表和索引进行完整的读/写操作仅花费约15分钟。)

What is the problem here?

(这里有什么问题?)

  ask by Matthias Otto translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...