If I want to update two rows in a MySQL table using the following command:
UPDATE table SET Col = Value1 WHERE ID = ID1
UPDATE table SET Col = Value2 WHERE ID = ID2`
I usually combine them into one command, so I donβt need to access the MySQL server twice from my C client:
UPDATE table SET Col = IF( ID = ID1 , Value1 , Value2) WHERE ID=ID1 OR ID=ID2
Is this really an increase in productivity?
Reference Information. I am using a specially crafted, fully-written, high-performance, highly-loaded web server.
source
share