I checked and the inner loop is:
cols, utimes = tdbcon.execute_with_data(u'select [idThumb], [file_time], [thumbnail_time] from [Thumbnail] where [idThumb] >= %s and [idThumb] <= %s' % (i, i + 999) )
i = i + 1000
if not cols:
continue
for utime in utimes:
tdbcon.execute_direct(u"update [Thumbnail] set [file_time_iso] = '%s', [thumbnail_time_iso] = '%s' where idThumb = %s" % (isotime(utime[1]), isotime(utime[2]), utime[0]) )
done += len(utimes)
tpprog.doing_progress(done)
I understand that the "tdbcon" object handles access to the database. I doubt that it looks at the image files.
Thus this supposedly just is a very slow database operation.
I am not a database expert, but I do know that in many cases using an index on appropriate fields can speed up certain operations greatly. I understand that this can be done with the mySQL admin tool.
-Michael