June 19, 2013

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

AUTO_INCREMENT, `col2` int(11) DEFAULT NULL, `col3` varchar(200) DEFAULT NULL, PRIMARY KEY (`id`), KEY `col2` (`col2`), KEY

Comment: Derived Tables and Views Performance

mysql auto_increment, `label` varchar(50) NOT NULL default ”, `link` varchar

Post: MySQL Indexing Best Practices: Webinar Questions Followup

primary key significantly fragmented. I also would note there are some MySQL optimizer restrictions in how well it can deal with primary key…cases should auto-increment be used as primary key? A: Auto-increment is a good default primary key. … UUID such as VARCHAR(36) instead of auto-increment A: If …

Post: Long PRIMARY KEY for Innodb tables

… disk were stored in the database: CREATE TABLE `imagecache` ( `url` varchar(255) character set latin1 NOT NULL default ”, `thumb_width` smallint… in case of MySQL/System crash is painful and great to be avoided. Long primary key – why did not I use auto_increment id in…

Post: MySQL 5.6.10 Optimizer Limitations: Index Condition Pushdown

… nicest features of the newer MySQL optimizer: the Index Condition Pushdown Optimization,…varchar(250), `nr_order` int(11) DEFAULT NULL, `role_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `role_id_note` (`role_id`,`note`) ) ENGINE=InnoDB AUTO_INCREMENT=22187769 DEFAULT…

Post: Enum Fields VS Varchar VS Int + Joined table: What is Faster?

… a small benchmark which shows MySQL performance when you use 3 different approaches: ENUM, VARCHAR and tinyint (+joined table) columns. … VARCHAR: CREATE TABLE cities_varchar ( id int(10) unsigned NOT NULL auto_increment, state varchar(50) NOT NULL, city varchar(255) NOT NULL, PRIMARY KEY (id), KEY

Post: Adventures in archiving

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

Post: Edge-case behavior of INSERT...ODKU

… NULL AUTO_INCREMENT, username VARCHAR(20) NOT NULL, host_id TINYINT UNSIGNED NOT NULL, last_modified TIMESTAMP NULL DEFAULT NULL, PRIMARY KEY(id), UNIQUE KEY(username… the PRIMARY KEY is always going to be considered as being defined first. So, MySQL checks our INSERT, sees that the next auto-inc…

Post: Shard-Query EC2 images available

varchar(100) DEFAULT NULL, PRIMARY KEY (`flight_id`), KEY `UniqueCarrier` (`UniqueCarrier`,`AirlineID`,`Carrier`), KEY `AirlineID` (`AirlineID`,`Carrier`), KEY `…: 539279360 Data_free: 4194304 Auto_increment: NULL Create_time: 2011…socket=/tmp/mysql-inno.sock [mysqld] socket=/tmp/mysql-inno.sock…

Post: InnoDB Full-text Search in MySQL 5.6 (part 1)

… int(10) unsigned NOT NULL, `full_name` varchar(100) DEFAULT NULL, `details` text, PRIMARY KEY (`id`), FULLTEXT KEY `full_name` (`full_name`,`details`) ) …ll get an error: mysql> CREATE TABLE dir_test_innodb4 (fts_doc_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY); ERROR 1166 (42000): …