Sephirot
04.01.2007, 15:25
Beim löschen des Suchindexes in unserem Forum, der ca. 134 Millionen Einträge hatte (2,1 Mio word, Rest postindex), hat allein das leeren der word Tabelle ewig gedauert mit DELETE. Für postindex hab ich dann TRUNCATE genommen (phpMyAdmin) und es war die reinste Wonne. :D
Wieso nutzt vB dann nicht auch TRUNCATE, da wo es unterstützt wird und sinnvoll ist?
Ich zitiere aus der MySQL-Doku
As stated, a DELETE statement with no WHERE clause deletes all rows. A faster way to do this, when you do not want to know the number of deleted rows, is to use TRUNCATE TABLE. See Section 13.2.9, “TRUNCATE Syntax” (http://dev.mysql.com/doc/refman/5.0/en/truncate.html).
Genau das ist ist bei dem Szenario der Fall: "DELETE FROM postindex" und "DELETE FROM word"
Wieso nutzt vB dann nicht auch TRUNCATE, da wo es unterstützt wird und sinnvoll ist?
Ich zitiere aus der MySQL-Doku
As stated, a DELETE statement with no WHERE clause deletes all rows. A faster way to do this, when you do not want to know the number of deleted rows, is to use TRUNCATE TABLE. See Section 13.2.9, “TRUNCATE Syntax” (http://dev.mysql.com/doc/refman/5.0/en/truncate.html).
Genau das ist ist bei dem Szenario der Fall: "DELETE FROM postindex" und "DELETE FROM word"