When MySQL released performance_schema it made a lot of new useful information available, but it wasn’t particularly user-friendly. The introduction of the MySQL SYS schema made it a lot easier for developers and DBAs to get useful insights from performance_schema. I was talking to some brogrammers the other day, and while they admitted that SYS schema is “totally legit”, they wished that it “spoke their language”.
To that end, I am happy to announce MySQL BRO schema. It’s a natural complement to SYS schema, and makes it easier for brogrammers to work with performance_schema.
Read on for a few examples of the BRO schema in action.
The SYS schema has a view named user_summary. In the BRO schema the equivalent is the bro_summary view.
Here’s a sample query on the bro_summary view:
123456789101112
mysql> use bro
Database changed
mysql> select * from bro_summary;
+------------------+-------------+--------------------+------------------------+-------------+-------------+-------------------+----------------------+--------------------+---------------+
| bro | bro_queries | bro_query_brotency | bro_query_avg_brotency | tabro_scans | file_ibros | file_ibro_latency | current_bronnections | total_bronnections | unique_brosts |
+------------------+-------------+--------------------+------------------------+-------------+-------------+-------------------+----------------------+--------------------+---------------+
| brobi_wan_kenobi | 230732 | 6.24 m | 1.62 ms | 0 | 3375788 | 1.83 h | 2 | 2 | 1 |
| broto_baggins | 173767 | 1.18 m | 405.89 us | 135 | 11841856 | 13.95 h | 11 | 17 | 3 |
| hulk_brogan | 1549 | 1.29 s | 830.87 us | 509 | 2720 | 732.04 ms | 5 | 516 | 2 |
| tony_bromo | 1064933 | 28.68 m | 1.62 ms | 136 | 32476670 | 22.55 m | 5 | 56 | 7 |
| brute | 76009 | 1.00 h | 47.55 ms | 37188 | 254239005 | 2.44 h | 1 | 37461 | 2 |
+------------------+-------------+--------------------+------------------------+-------------+-------------+-------------------+----------------------+--------------------+---------------+
Likewise the host_summary view from SYS schema is replaced with the brost_summary view in BRO schema:
1234567891011121314
mysql> select * from brost_summary;
+--------------------------------+-------------+--------------------+------------------------+-------------+------------+-------------------+----------------------+--------------------+-------------+
| brost | bro_queries | bro_query_brotency | bro_query_avg_brotency | tabro_scans | file_ibros | file_ibro_latency | current_bronnections | total_bronnections | unique_bros |
+--------------------------------+-------------+--------------------+------------------------+-------------+------------+-------------------+----------------------+--------------------+-------------+
| background | NULL | NULL | NULL | NULL | NULL | NULL | 0 | 2 | 0 |
| ip-10-60-41-26.ec2.internal | 55959 | 3.52 h | 226.20 ms | 13368 | 52416910 | 3.66 h | 23 | 22 | 15 |
| ip-10-102-56-230.ec2.internal | 1792854 | 2.17 h | 4.36 ms | 6703 | 39771784 | 4.14 h | 1 | 7 | 5 |
| ip-10-30-14-233.ec2.internal | 860733 | 1.20 h | 5.03 ms | 46829 | 10609581 | 53.39 m | 14 | 4 | 3 |
| ip-10-21-17-24.ec2.internal | 552149 | 5.84 m | 634.79 us | 77911 | 39970438 | 16.93 m | 13 | 6 | 18 |
| ip-10-199-205-174.ec2.internal | 3481 | 4.09 h | 4.23 s | 187574 | 10722269 | 1.67 h | 12 | 5 | 11 |
| ip-10-139-129-225.ec2.internal | 1909218 | 3.57 h | 6.73 ms | 117428 | 1310063 | 2.46 h | 21 | 11 | 15 |
| ip-10-154-79-189.ec2.internal | 1643780 | 2.72 h | 5.95 ms | 203993 | 31900386 | 3.44 h | 15 | 12 | 14 |
| localbrost | 787149 | 3.10 h | 14.17 ms | 118728 | 894439407 | 4.28 d | 11 | 39514 | 3 |
+--------------------------------+-------------+--------------------+------------------------+-------------+------------+-------------------+----------------------+--------------------+-------------+
This just scratches the surface of the insights you can get from the BRO schema. The truly brolific amount of information in BRO schema makes it absolutely bronafide.