Last spring, we added a feature that allows the user to see the progress of writes in a statement. Vadim liked it. In 2.2.0, in “show processlist”, we add progress information on reads.
Here is an example of what “show processlist” displays on an update:
1 2 3 4 5 6 7 8 9 10 |
mysql> show processlist G *************************** 1. row *************************** Id: 1 User: root Host: localhost db: test Command: Query Time: 7 State: Queried about 1576008 rows, Updated about 197000 rows Info: update foo set a=9 where a=8 |
Here is an example of what “show processlist” displays on an insert that requires a query:
1 2 3 4 5 6 7 8 9 10 |
mysql> show processlist G *************************** 1. row *************************** Id: 1 User: root Host: localhost db: test Command: Query Time: 6 State: Queried about 1542001 rows, Inserted about 771000 rows Info: insert into bar select* from foo where a < 5 |
And here is an example of what show processlist displays in a query:
1 2 3 4 5 6 7 8 9 10 |
mysql> show processlist G *************************** 1. row *************************** Id: 1 User: root Host: localhost db: test Command: Query Time: 4 State: Queried about 2790000 rows Info: select sum(a) from foo |
As we see in the examples above, the work required to execute some statements are a combination of reads and writes. Having progress information on both helps provide the user with a better understanding of what is going on in the system.