关于select的性能:post删除或截断表?

时间:2011-08-11 17:01:04

标签: mysql performance

如果我使用delete从表中删除数据,那么select查询的性能是否会降低?如果我使用truncate清除整个表与删除所选行相比,是否存在任何性能差异。

1 个答案:

答案 0 :(得分:1)

http://dev.mysql.com/doc/refman/5.1/en/truncate-table.html

Truncate operations drop and re-create the table, which is much faster than deleting rows one by one, particularly for large tables. 

还:http://www.softstuff-consulting.com/kbase/showkb.asp?id=15