I have a script running against a database with no GUI. This simple query lets me see its progress:
select
*,
(select count(*) from domains) as count,
(select 456976-count(*) from domains) as remaining
from domains
order by domain desc
limit 0, 1;
Using MySQL Workbench, how can I automatically refresh/re-run this query every few seconds?
I tried Googling, but didn't come up with anything relevant.
Aside: the magic number 456,976 is 26^4; it has to do with the script.
Best Answer
First, create a Stored Procedure that calls the query and sleeps every 10 seconds
Now, call the Stored Procedure from DOS Command Line
or you could login to mysql
then call the query at the MySQL prompt
Give it a Try !!!
Caveat
Please notice I call the COUNT once and subtract it from 456976 to speed up the count a little.