June 18, 2013

Post: Be productive with the MySQL command line

… the edit command. Let’s say you have the following query: mysql> select count(*) from film left join film_category using(film… the mysql client where you can type ; or \G to execute the query. Using tee In some situations, like when you are testing…, pretty much like the Unix tee command: mysql> tee queries.log Logging to file ‘queries.log’ mysql> use sakila Reading table information for completion…

Post: Accessing Percona XtraDB Cluster nodes in parallel from PHP using MySQL asynchronous queries

…’root’, ”, ‘test‘); if ($mysqli->connect_error) { echo ‘Connect Error (‘ . $mysqli->connect_errno . ‘) ‘ . $mysqli->connect_error; }else{ $all_links[]=$mysqli; $mysqli->query… using PHP with MySQLnd drivers we can execute 5 MySQL asynchronous queries in parallel against 5 different nodes of Percona …

Post: Load management Techniques for MySQL

… need to know it is not MySQL problem, might be even not problem with your MySQL configuration, queries and hardware, even though fixing… to use. Do push concurrency too high Many developers will test script with multiple level of concurrency and find out doing… too much in this case throttling by having relatively short queries and introducing “sleeps” between them can be a good idea…

Post: Concatenating MyISAM files

mysql> flush tables; Query OK, 0 rows affected (0.01 sec) Then, at the shell command line: root@django:/var/lib/mysql/test# ls test_concat.frm test… (0.00 sec) mysql> flush tables; Query OK, 0 rows affected (0.00 sec) root@django:/var/lib/mysql/test# myisamchk -rq test_concat – check…

Post: Test Drive of Solid

… versioning system ? Test 3: Phantom rows: before test: mysql> select * from test2; +—-+———–+ | id | names | +—-+———–+ | 1 | Mysql | | 2 | Solid | | 3 | MyISAM | +—-+———–+ Session1: mysql> begin; Query OK, 0 rows affected (0.00 sec) Session2: mysql

Post: Eventual Consistency in MySQL

… control queries automatically, we can run them at any time: $ cat generate_foreign_key_checks.sql | mysql -N | mysql -E *************************** 1. row *************************** test.Bar… same SQL queries for quality control: mysql> CREATE TABLE test.MY_KEY_COLUMN_USAGE LIKE INFORMATION_SCHEMA.KEY_COLUMN_USAGE; mysql> INSERT INTO test.MY…

Post: Shard-Query EC2 images available

…=’Contains all avaialble data from 1988 to 2010′; mysql> use ontime1; Database changed mysql> show table status like ‘ontime_fact’G *************************** 1…) Execute the test: As seen above, the run_query script will run one more more semicolon terminated SQL statements. The queries for the…

Post: Testing MySQL column stores

… of my analysis focused on testing specific MySQL functionally with Infobright’s storage engine. A lot of my tests involved corner or edge… analysis queries. These tests were intended to approximate what would happen if you ported a MyISAM OLAP application to ICE. My testing suggests… it could not run some of the queries. ICE supports almost all of the MySQL aggregation functions. Notably, GROUP_CONCAT is not…

Post: Troubleshooting MySQL Upgrade Performance Regressions

… the query which performs differently between MySQL Server versions you should: Check Query Plan Run EXPLAIN to see if plans for the query are the same. Changing Query Execution… bug is in Percona Server indeed by running the same test on MySQL server of the same version. If you’re Support…

Post: Percona Testing: Innodb crash / recovery tests available

… unfortunately, no tests have been created for the main MySQL branch. The MySQL at Facebook branch has a number of tests that are quite… crashed and restarted: $ ./kewpie.py –suite=innodbCrash –basedir=mysql-5.5 –test-debug crashCommitAfter_test 20111221-142500 INFO MASTER_PORT: 9307 20111221-142500… our shiny new Innodb crash tests!), it is very easy to shuffle data and queries for all tests: ./kewpie.py –suite=innodbCrash –basedir…