Best way to update a large DB ?

Neville Smythe neville.smythe at optusnet.com.au
Mon Jun 13 19:19:01 EDT 2022


> update myDB set col1 = "blah blah", col2 = "blah blah" where id = 12345 
> limit 1
> I have a file with all the requests that weights almost 200 Mb.

Unless your "blah blah”s are very large indeed shouldn’t your change data be packable into a much smaller file to transmit? Eg if they were integers (or could be made to be integer, ie indexes into string tables)  3 integers per line could be packed into 13 bytes, file length 2MB. If they are short strings and you needed say 100 bytes per line that’s still only 20MB. Then use php - if you have the luxury lcserver -to unpack at the server, wrapping the long list of requests with BEGIN and END TRANSACTION of course.


Neville





More information about the use-livecode mailing list