June 19, 2013

Post: Migrating between MySQL schemas with Percona Xtrabackup

…_old Make sure that the files are owned by mysql: chown mysql:mysql /var/lib/mysql/orig_old/* For each table, run: ALTER TABLE… to generate all of those statements for steps 7 and 10 in two scripts: mysql -N -B <<'EOF' > discard-ddl.sql SELECT CONCAT… TABLE_SCHEMA=’orig’ AND ENGINE=’InnoDB’; EOF mysql -N -B <<'EOF' > import-ddl.sql SELECT CONCAT(‘ALTER TABLE `’, table_name, ‘` IMPORT TABLESPACE…

Post: MySQL Query Patterns, Optimized - Webinar questions followup

… gave a presentation on “MySQL Query Patterns, Optimized” for Percona MySQL Webinars.  If you missed it, …: Doesn’t the primary key solution for random selection only work when the IDs for movies are…50000 with no movies, but your random number generator picks values in that range with equal frequency…

Post: Percona XtraDB Cluster 5.5.30-23.7.4 for MySQL now available

…Bug fixed #1128906 (Alexey Bychko). The method of generating md5 digest over tuples in a table… hanging. Bug fixed #1130888 (Seppo Jaakola). If MySQL replication threads were started before running wsrep …(Raghavendra D Prabhu). In case CREATE TABLE AS SELECT statement was running in parallel with the…

Post: How to recover table structure from InnoDB dictionary

… id to find indexes of the table. mysql> select * from SYS_TABLES WHERE NAME=’sakila/actor’; +————–+—–+——–+——+——–+———+————–+——-+ | NAME |… dictionary tables into some MySQL server. Use LOAD DATA INFILE constraints_parser generates mysql>LOAD DATA INFILE ‘/…

Post: Eventual Consistency in MySQL

….  From that information, we can generate an exclusion-join query for each foreign key relationship: mysql> SELECT CONCAT( ‘SELECT ‘, GROUP_CONCAT(DISTINCT CONCAT(K… way to generate quality control queries automatically, we can run them at any time: $ cat generate_foreign_key_checks.sql | mysql -N | mysql -E…

Post: MySQL EXPLAIN limits and errors.

…- MySQL does not really have the special “plan generating” step, instead plan is generatedMySQL will still print full number. Here is example: mysql> explain select * from lt limit 10; +—-+————-+——-+——-+—————+———+———+——+——+————-+ | id | select

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

… further blog posts. Benchmark Details: The SSB employs a data generator which produces data for a star schema.  Star schema are… pool in pages afterwards: mysql> select sq.*, pages / (@@innodb_buffer_pool_size / 16384) * 100 pct_buffer_pool from ( select table_name, index_name… set (0.00 sec) mysql> select sq.*, pages / ((@@innodb_buffer_pool_size / 16384)) * 100 pct_buffer_pool from ( select table_name, index_name…

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

… which query depends on. If not you need to re-generate the query result. Removing of stale queries in this case… detect the result for exactly same query is already being generated, wait for completion and when simply use it. More Granular… applications in MySQL have very large number of queries doing updates through primary key and use primary key for selects. I believe…

Post: MySQL Configuration Wizard Updated

…ve wanted for a long time: the ability to generate a more strict, safer configuration file. There’s … options to prevent common problems MySQL users run into because of too-permissive MySQL behaviors. These are the … beneficial for you, and so on. I have selected the next priorities, but I don’t want …

Post: How to recover deleted rows from an InnoDB Tablespace

….percona.com/docs/wiki/innodb-data-recovery-tool:mysql-data-recovery:generating_a_table_definition With the table definition on … sec) Records: 3 Deleted: 0 Skipped: 0 Warnings: 0 mysql (employees) > select * from salaries where emp_no=10008; +——–+——–+————+————+ | emp_no | …