go-fast-sql
go-fast-sql copied to clipboard
Batch updates
Speed up Updates by batching them as explained at http://stackoverflow.com/questions/1006969/why-are-batch-inserts-updates-faster-how-do-batch-updates-work
UPDATE mytable
SET
mytext = myvalues.mytext,
myint = myvalues.myint
FROM (
VALUES
(1, 'textA', 99),
(2, 'textB', 88),
...
) AS myvalues (mykey, mytext, myint)
WHERE mytable.mykey = myvalues.mykey
Another example that might be easier to implement: http://stackoverflow.com/questions/16709252/mysql-bulk-update