Sunday, April 17, 2005

End Query with \G instead of ;

You can use \G instead of ; for tables with lots of fields.

mysql> SHOW STATUS LIKE 'Qcache%';
+-------------------------+-----------+
| Variable_name | Value |
+-------------------------+-----------+
| Qcache_queries_in_cache | 6990 |
| Qcache_inserts | 6990 |
| Qcache_hits | 3987 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 621 |
| Qcache_free_memory | 176329432 |
| Qcache_free_blocks | 1 |
| Qcache_total_blocks | 13998 |
+-------------------------+-----------+
8 rows in set (0.00 sec)

mysql> SHOW STATUS LIKE 'Qcache%' \G
*************************** 1. row ***************************
Variable_name: Qcache_queries_in_cache
Value: 7902
*************************** 2. row ***************************
Variable_name: Qcache_inserts
Value: 7902
*************************** 3. row ***************************
Variable_name: Qcache_hits
Value: 6456
*************************** 4. row ***************************
Variable_name: Qcache_lowmem_prunes
Value: 0
*************************** 5. row ***************************
Variable_name: Qcache_not_cached
Value: 3887
*************************** 6. row ***************************
Variable_name: Qcache_free_memory
Value: 172986416
*************************** 7. row ***************************
Variable_name: Qcache_free_blocks
Value: 1
*************************** 8. row ***************************
Variable_name: Qcache_total_blocks
Value: 15828
8 rows in set (0.00 sec)

No comments: