UPDATE table1 SET col1='True'
This query takes more than 30 secs for about 6000 records. Why is it so slow?
Asked
Active
Viewed 8,223 times
3
-
Check if some other operation is blocking. It might simply be that some other process is holding a lock on the table, preventing you from updating. – R van Rijn Jan 23 '10 at 07:46
-
It may be useful to add a SHOW CREATE TABLE for this table to your question. It sounds a bit odd. Also are other queries/updates slow? If so it may be a database configuration issue. – Phil Wallach Jan 23 '10 at 07:54
1 Answers
6
Do you have a trigger?
And see my answers here too: Why does an UPDATE take much longer than a SELECT?
-
1I had trigger, temporarily turning off the trigger did the magic. ALTER TABLE table1 DISABLE TRIGGER ALL UPDATE table1 SET Col1='True' ALTER TABLE table1 ENABLE TRIGGER ALL – Rajesh Jan 23 '10 at 08:19