How to collect the running time of activities performed in the database without running directly in mysql

Asked

Viewed 30 times

-1

I need to get the runtime of several Serts , updates , alter Tables among other activity that I do in the bank , I know that if I did it directly in mysql it would return me at the end of the operation but I am running a script in js to perform several operations , this execution time is saved in some if yes where I can pick up , if not what solutions you give me .

Database that uses MYSQL example : The script execulta 1000 Inserts , after 500 updates , 200 delete ... , I would like to take the execution time of this to at the end make a comparison that aims .

1 answer

0

A quick solution is to create two variables, Initial Time and Final Time, when starting the query you assign the Initial Time variable to the computer time and when finishing the query, assign value to Final Time and see the time elapsed seeing the difference between one and the other.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.