4
I have a table Innodb in Mysql where I store a user’s account balance. To give a UPDATE
on the balance I use Transactions to prevent two or more queries from trying to give UPDATE
simultaneously and ends up corrupting the value of the balance.
Using PHP preference, or some other tool specifies for this, what is the best way to perform queries testing, for example, send 10 queries simultaneously by requesting UPDATE
table to test the efficiency of the use of Transactions and make sure my algorithm won’t corrupt the data?
It would be good practice then to simulate hundreds or even thousands of HTTP request using Apache AB? http://httpd.apache.org/docs/2.2/programs/ab.html
– Gustavo Piucco
yes, with apache benchmark you can already measure the completed requests, the failed ones, the response time, and this will already be considering the time of the queries, of course depending on the results you will need to adjust the queries in BD.
– SneepS NinjA