June 18, 2013

Post: Modeling MySQL Capacity by Measuring Resource Consumptions

…You can take a look at procfs for MySQL process: root@ubuntu:/var/log/mysql# cat /proc/19018/stat 19018 (mysqld…Full scan 0% yes, 99% no # Tmp table 1% yes, 98% no # Tmp table on 1% yes, 98% no In …an understanding how much your queries (at least most important ones) cost you in terms of CPU and IO. …

Post: Hidden columns of query_review_history table

… to process a MySQL slow query log and store historical values for review trend analysis into query_review_history table. According to its official documentation you can populate many columns in that table but there are other important ones such as…

Post: A recovery trivia or how to recover from a lost ibdata1 file

… with the one provided by the customer Import the tablespace At this point I should have access to the table but, although MySQL was…/lib/mysql/recover/ chown mysql.mysql /var/lib/mysql/recover/$CURRENT_TABLENAME.ibd sleep 1 echo “importing tablespace” mysql -u root -e “alter table recover.$CURRENT_TABLENAME import

Post: Copying InnoDB tables between servers

… remote server you have to run MySQL server ® with XtraDB6 storage engine, you can take one of our binary builds with 5… check mysql> select count(*) from order_line; +———-+ | count(*) | +———-+ | 32093604 | +———-+ 1 row in set (3 min 29.32 sec) New table has been imported!

Post: Should we give a MySQL Query Cache a second chance ?

…different developers. Supporting different comments is especially important as many application put extra information … We could implement API which would allow one to use local memory, Memcache or …be presented as some INFORMATION_SCHEMA tables. Self Refresh MySQL Query Cache causes not uniform …

Post: How to recover deleted rows from an InnoDB Tablespace

… a single directory with some subdirectories inside, one for every single index in the table: ~/recovery-tool# ls pages-1329221407/FIL_PAGE… is to import it in our database: mysql (employees) > LOAD DATA INFILE ‘/root/recovery-tool/data/salaries.recovery’ REPLACE INTO TABLE `salaries` FIELDS…

Post: Why you should ignore MySQL's key cache hit ratio

…when you start to assign any importance to this ratio. The MySQL manual doesn’t fall into this …(23% miss ratio). Server #2 has one trillion Key_reads, and one hundred quatrillion Key_read_requests (… more important to you, etc) and choose an amount of memory based on how important those tables are to…

Post: InnoDB Full-text Search in MySQL 5.6: Part 2, The Queries!

…”. OK, sounds easy enough: mysql: SHOW CREATE TABLE innodb_myisam_stopword\G *************************** 1. row *************************** Table: innodb_myisam_stopword Create Table: CREATE TABLE `innodb_myisam_stopword` ( `value… in the MySQL 5.6 documentation; every place where it talks about creating one of these stopword tables, it simply mentions the table engine… important best practice even if FTS isn’t involved. Always test how your application behaves as a result of a major MySQL

Post: MySQL 5.6 vs MySQL 5.5 and the Star Schema Benchmark

…1 results in 587MB of raw data, mostly in one  table (lineorder). Each of the 13 queries were executed …Default config for MySQL 5.5 and MySQL 5.6, no tuning at all Config 2: MySQL 5.6 with …to “pollution” by full table scans.  In the classic LRU, a full table scan pushes out important hot pages from …