Sunil
Sunil

Reputation: 807

Regarding performance of select: post delete or truncate the table?

Do the performance of select query decreases if I remove the data from a table using delete ?Is there any performance difference if I use truncate to clear the entire table in comparison with delete the selected rows.

Upvotes: 0

Views: 185

Answers (1)

llamerr
llamerr

Reputation: 3196

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. 

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

Upvotes: 1

Related Questions