June 19, 2013

Post: Implementing SchemaSpy in your MySQL environment

… Percona Server 5.6.10 sandbox: description=MySQL driver=com.mysql.jdbc.Driver connectionSpec=jdbc:mysql://127.0.0.1:5610/schemaspy driverPath… additional tabs: Tables – Names, number of children, parents, count of columns, row counts, and comments — a great way for a high level overview…

Comment: Derived Tables and Views Performance

i would appreciate your comments on this script: taken from: http://phptechnicalgroups.blogspot.co.il/2013/05/simple-mysql-and-php-prodcuts…’,'root’,”); mysql_select_db(‘test’,$mysql); function display_menu($parent, $level) { $result = mysql_query(“SELECT a.id, a.label, a.link, Deriv1.Count FROM…

Post: Understanding the maximum number of columns in a MySQL table

…*FCOMP+288+ n_length+int_length+com_length > 65535L || int_count > 255) { my_message(ER_TOO_MANY_FIELDS, ER(ER_TOO…: 17+2*(strlen(field_name)+2) (bytes) + length of all comments (in bytes) + length of all intervals (for ENUM, SET) in…).”‘) COMMENT ‘”.cname($_,254).”‘,\n”; } chop $sql; chop $sql; $sql.=”);”; print $sql; So the maximum number of columns for a table in MySQL

Comment: SimCity outages, traffic control and Thread Pool for MySQL

… the comments refer to the older eBay-sponsored thread pool implementation. Is it the same implementation that was available in MySQL 6… single-threaded libevent and had to serialize on LOCK_thread_count or some other global mutex to do its work.

Post: Ultimate MySQL variable and status reference list

I am constantly referring to the amazing MySQL manual, especially the option and variable reference table. But just …

Post: MySQL Query Cache WhiteSpace and comments

… sec) mysql> /* another comment */ select count(*) from fact where val like “%c%”; +———-+ | count(*) | +———-+ | 0 | +———-+ 1 row in set (0.00 sec) mysql> select /* inside comment */ count(*) from fact where val like “%c%”; +———-+ | count(*) | +———-+ | 0 | +———-+ 1 row in set (8.81 sec) mysql> select /* inside comment */ count(*) from…

Post: MySQL VIEW as performance troublemaker

… would you get number of comments left by the given user ? mysql> select count(*) from comments where user_id=5; +———-+ | count(*) | +———-+ | 1818 | +———-+ 1 row in… things more modular and using MySQL VIEWs ? mysql> create view user_counts as select user_id,count(*) cnt from comments group by user_id; Query…

Post: Advanced index analysis with mk-index-usage

…_id, db, tbl HAVING COUNT(*) > 1 ) AS qv USING(query_id, db,…mysql> select * from queries where query_id = 7675136724153707161\G *************************** 1. row *************************** query_id: 7675136724153707161 fingerprint: select * from wp_comments where comment_post_id = ? and comment

Post: Shard-Query EC2 images available

… DEFAULT CHARSET=latin1 COMMENT=’Contains all avaialble data from 1988 to 2010′; mysql> use ontime1; Database changed mysql> show table status …, the third parse time). $ echo “select count(*) from ontime_fact;” | ./run_query Array ( [count(*)] => 135125787 ) 1 rows returned (0.084244966506958s, …

Comment: MySQL VIEW as performance troublemaker

…; +———-+ | count(*) | +———-+ | 100 | +———-+ 1 row in set (3.71 sec) And from VIEW (CREATE VIEW user_counts AS SELECT * FROM comments): mysql> select count(*) from user_counts where user_id = 5; +———-+ | count(*) | +———-+ | 100 | +———-+ 1 row in set…