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… AUTO_INCREMENT, PRIMARY KEY (`parent_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CREATE TABLE `child_A` ( `id` int(10) unsigned NOT NULL…) unsigned DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CREATE TABLE `child_B` ( `id` int(10) unsigned NOT NULL…

Post: The small improvements of MySQL 5.6: Duplicate Index Detection

…`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.00 sec) In previous versions of MySQL, you can create two indexes… warning (0.56 sec) Records: 0 Duplicates: 0 Warnings: 1 mysql> SHOW WARNINGS\G *************************** 1. row *************************** Level: Note Code: 1831 Message: Duplicate…

Post: How to recover table structure from InnoDB dictionary

…) unsigned DEFAULT NULL, PRIMARY KEY (`NAME`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `NAME` is a human readable table name in form database… NULL, PRIMARY KEY (`TABLE_ID`,`POS`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 Here `TABLE_ID` is a well known table identifier, `POS…`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 Fields names explain their content. Index id in our example is 1679: mysql> SELECT * FROM SYS_FIELDS…

Post: Shard-Query EC2 images available

… `AirlineID` (`AirlineID`,`Carrier`), KEY `Carrier` (`Carrier`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT=’Contains information on flights, and what airline offered those…=InnoDB DEFAULT CHARSET=latin1 COMMENT=’Contains all avaialble data from 1988 to 2010′; mysql> use ontime1; Database changed mysql> show table status like…

Post: Adventures in archiving

… following options for further testing. InnoDB’s inbuilt row compression MySQL‘s inbuilt compress() function leveraging zlib to provide compression of…_INCREMENT, `dat` blob, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `compressed_row` ( `id` int(11) NOT NULL AUTO…

Post: Hijacking Innodb Foreign Keys

…) DEFAULT NULL, PRIMARY KEY (`parent_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CREATE TABLE `child` ( `parent_id` int(11) NOT NULL, `v… (`parent_id`) REFERENCES `parent` (`parent_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 INSERT INTO parent(parent_id) VALUES(1,”"); INSERT INTO child…` (`parent_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.00 sec) mysql> create table parentx(i int) engine=innodb…

Post: How fast can MySQL Process Data

… ) ENGINE=MEMORY DEFAULT CHARSET=latin1 mysql> select count(*) from m; +———-+ | count(*) | +———-+ | 1047684 | +———-+ 1 row in set (0.00 sec) mysql> select count(*) from… `m4` ( `c` char(128) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 mysql> show table status like “m4″ \G *************************** 1. row *************************** Name: m4…

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

… name, address, and the like. We are using MySQL 5.5.30 and MySQL 5.6.10 with no configuration tuning other… use the latin1 character set. mysql: CREATE TABLE innodb_ft_list2 ( value VARCHAR(18) NOT NULL DEFAULT ”) ENGINE=InnoDB DEFAULT CHARSET=latin1; Query OK, 0 rows affected (0.02 sec) mysql: SET GLOBAL innodb_ft_server_stopword…

Post: CentOS 5.8 users: your UTF-8 data is in peril with Perl MySQL

…-8 flag.  As far as Perl is concerned, this is Latin1 data. What does this mean for you?  In general, it… could corrupt the data by treating UTF-8 data as Latin1 data.  If the program doesn’t alter the data, then… Perl to access that data Have not upgraded DBD::mysql (perl-DBD-MySQL) then your UTF-8 data is in peril with…

Post: The case for getting rid of duplicate “sets”

…=latin1 | +——-+—————————————————————————————————–+ 1 row in set (0.00 sec) mysql> select count(*) from ex1; +———-+ | count(*) | +———-+ | 73027220 | +———-+ 1 row in set (0.00 sec) mysql… NULL, `cnt` bigint(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; mysql> insert into search_set values (-2,1),(-3,1),(-10…