0

I run multiple MySQL queries together in phpMyAdmin, I basically want to be able to see the results of each query (rows affected/time taken etc) as it completes. Say I have the following sample queries

UPDATE PC1 SET `A1` = 'C1' WHERE `A1` = 'B1';
UPDATE PC1 SET `A2` = 'C2' WHERE `A2` = 'B2';
UPDATE PC1 SET `A3` = 'C3' WHERE `A3` = 'B3';

When I run these and say a few more what happens is at the end of the third/last query I get the results together

163 rows affected. (Query took 0.0015 seconds.)
445 rows affected. (Query took 0.0065 seconds.)
779 rows affected. (Query took 0.0215 seconds.)

I currently use SHOW FULL PROCESSLIST but I would like to be able to see the query results as they complete.

Is there a way to for me to run all of the queries together and see the query results as they complete?

I want to run the above three update queries. I can run it one by one, run the first one and wait for it to complete, review the rows affected/time taken and then run the second and wait for it to complete and the same for the third. Alternatively, I can just write all three together and wait for all of them to run and complete. I am doing the second, however what happens is all of the three run together and at the end of the third, I see the rows affected for all three together. I am trying to see if I can see the output of each query as it completes. In reality, I have tens of queries.

I get all three stats, however I get all of them at once on completion of the third query. I am trying to see if I can get the stats as they complete, say first query completes and I get the stats on screen instead of waiting for all three to complete and then seeing all three stats at once.

1

You send one command, one line (which consists from 3 queries). So PHPMyAdmin waits until this command finished, and then shows the result of this one command which consists from 3 separate results. I think he has this feature - it is PHPs input buffering.

Use CLI interface, for example - it shows the result for each query in a command immediately after this result is formed and sent to server's output / client's input. - Akina

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.