How to collect the activity execution time performed in the database without executing directly in mysql

-1

I need to get the runtime of several inserts, updates, alter tables between other activity I do in the database, I know that if I did it right in mysql it would return to the end of the operation, but I am executing a script in js for

Bank I use MYSQL example: The scrip executes 1000 inserts, then 500 updates, 200 delete ..., I would like to take the execution time of this, in the end to make a comparison that I want.

    
asked by anonymous 03.06.2018 / 21:52

1 answer

0

A quick solution is to create two variables, Horainicial and Horafinal, when you start the query, you assign the variable Timeout to the time of the computer and when you finish the query, it assigns the value to the Final Time and verifies the elapsed time by seeing the difference between one and the other .

    
04.06.2018 / 18:01