June 19, 2013

Post: Faster MySQL failover with SELECT mirroring

…over in both directions. Aside from MySQL Cluster, which is more special-purpose…query: select table_schema, table_name, page_type, count(*) from information_schema.innodb_…insert buffer. As Peter explained in his recent post on the insert buffer, the other thing the SELECTs do is keep the insert

Post: Concurrent inserts on MyISAM and the binary log

… different order of execution. The MySQL manual actually says this, but…inserts are converted to normal inserts for CREATE … SELECT or INSERTSELECT statements. If you use mysqladmin debug, you’ll see an ordinary SELECTSELECT INTO OUTFILE followed by LOAD DATA INFILE. You can use InnoDB

Post: MySQL Indexing Best Practices: Webinar Questions Followup

…is collation specific. Q: ORDER By optimization issues: select * from table where A=xxx and B …down your inserts and make primary key significantly fragmented. I also would note there are some MySQL …”order by desc” indicates a double linked list. Innodb has double linked list – each leaf page …

Post: How to recover a single InnoDB table from a Full Backup

…recovery process on the backup with innodb_fast_shutdown=0 and therefore merging all the insert buffers. # innobackupex –defaults-file=/etc/…the new tablespace: mysql> set FOREIGN_KEY_CHECKS=0; mysql> ALTER TABLE salaries IMPORT TABLESPACE; mysql> set FOREIGN_KEY_CHECKS=1; mysql> SELECT * FROM …

Post: Heikki Tuuri answers to Innodb questions, Part II

…- choosing innodb_buffer_pool_size Q36: There have been several MySQL bugs opened about multi-core scalability (concurrent queries, autoincrement, concurrent inserts, …or not showed up in “show innodb status”. select * from table where id=5 show innodb status: Hash table size 10624987, …

Post: How much memory Innodb locks really take ?

After playing yesterday a bit with INSERTSELECT I decided to check is Innodb locks are relly as efficient in terms of low…, however we can see locking overhead is not that large: mysql> select count(i) from sample; +———-+ | count(i) | +———-+ | 1638400 | +———-+ 1 row in…

Post: Percona Server on the Raspberry Pi: Your own MySQL Database Server for Under $80

…is how to get Percona Server for MySQL up and running: Insert the SD card into a slot on… | InnoDB | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, and foreign keys | YES | YES | YES | [...] mysql> SELECT

Post: How FLUSH TABLES WITH READ LOCK works with Innodb Tables

mysql> show processlist; …global read lock | insert into C values …SELECT queries to let backup to proceed, but resolving server gridlock one way or another. If you’re just using Innodb

Post: Hijacking Innodb Foreign Keys

…`parent` (`parent_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 INSERT INTO parent(parent_id) VALUES(1,”"); INSERT INTO child(parent_id)… sec) mysql> select * from child; +———–+——+ | parent_id | v | +———–+——+ | 1 | NULL | +———–+——+ 1 row in set (0.00 sec) mysql> update…