optimization - Mysql retrieve results of update query -


i developing high load web-application , trying reduce quantity of sql queries. quite need update 1 row , results. think nice have possibility run query , @ same time receive values of updated fields without making 2 calls of mysql server. example, execute following query:

update table set val=val+1 id=1;

and function returns:

array("val"=>10)

sure, understand, can write own function, first makes update, select , returns result. problem in such case mysql server have seek data, update during first query, comes second query, again requires seek data , return it. , thinking way, mysql seeks data, updates , returns updated data.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -