I have a table with 19000 rows which needs to updated and accessed by
One approach to avoid locking the table as much is to create a TABLE TEMP
mytable and as last action in threads to move rows from mytable_tmp to
mytable, like this:
CREATE TEMP TABLE mytable_tmp ...
INSERT INTO mytable_tmp SELECT * FROM mytable;
UPDATE mytable_tmp SET...
DELETE FROM mytable;
INSERT INTO mytable SELECT * FROM mytable_tmp;
DROP TABLE mytable_tmp;
Or is there a better way?
Can the last transaction be achieved quicker?
Are indices in mytable automatically updated?
The PRIMARY KEY in mytable keeps incrementing can it be resetted or should I