Q:

How do you time multiple SQL queries in MySQL workbench?

A program I inherited runs 800 single queries once every minute or so.  I was able to grab all these queries and I want to test to see how long it takes to run them in a sequence to see if its an issue that I need to address or if it is ok as is.
The SQL queries are all simple SELECT queries with a few where clauses:
SELECT DISTINCT roles.desc FROM descRoles roles, listUsers users, listUsers mapping WHERE mapping.roleId = roles.roleId AND mapping.idx = users.idx AND users.UserName = 'fakeNameHere';

If there's a typo in my select query please ignore it they run fine.  I want to know if there is something I can put before and after all 800 queries to time how long it takes to run all of them.  Also, if I could turn off the result tabs on them since after about 40 I get a message that my maximum result tabs are reached, that also seems necessary.

A:

Workbench is not the tool for timing queries.  What you want is mysqlslap https://dev.mysql.com/doc/refman/8.0/en/mysqlslap.html 

