Hi everyone.
I noticed that a script of mine became very slow, then I narrowed down to the problem: it was an Update query. The weird thing is that the SELECT query is very fast. The table has about 600,000 entries. And yes, id is UNIQUE PRIMARY KEY. Here are some examples:
SELECT * FROM `tmp_pages_data` WHERE id = 19080 LIMIT 0 , 30
Showing rows 0 - 0 (1 total, Query took 0.0004 sec)
And now the update query:
UPDATE tmp_pages_data SET page_status = 1 WHERE id = 19080
1 row(s) affected. ( Query took 24.5968 sec )
As you can see, the select is very fast, but the update is veery slow. How is this possible?