Speeding up MySQL update query
Posted on 2006-06-19
Ok, I've been working on this script for awhile and have one major bottleneck that I can't seem to get past.
As the table I am updating grows in size, this particular query takes longer and longer. Towards the end of processing it takes about a full second, which considering how many times it has to run, this slows down the whole process by several hours. There are only about 80k rows in the table at the end of processing.
The query basically looks like:
UPDATE table SET thumbnailname = 'IMAGENAME.JPG' WHERE id1=10 AND num=20902 ;
The names have been changed to protect the innocent, but that's the query.
I don't see why such a simple query should take so long, so I'm posting here.
Any help would be appreciated, If you need any more info, please let me know.