June 19, 2013

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

TABLE `dir_test_innodb` ( `id` int(10) unsigned NOT NULL, `full_name` varchar(100) DEFAULT NULLmysql> alter table dir_test_innodb ADD FULLTEXT KEY (full_name, details); Query OK, 0 rows affected, 1 warning (39.73 sec) Records: 0 Duplicates: 0 Warnings: 1 mysql

Post: Converting Character Sets

not work: mysql> CREATE TABLE `t1` ( ->   `c1` text NOT NULL -> ) ENGINE=MyISAM DEFAULT CHARSET=latin1; Query OK, 0 rows affected (0.02 sec) mysql> ALTER TABLE

Post: Improved InnoDB fast index creation

default method is used: mysql> SET profiling=1; Query OK, 0 rows affected (0.00 sec) mysql> ALTER TABLE t ADD COLUMN v VARCHAR(1); Query OK, 4194304 rows affected (1table. There’s also a number of cases when this optimization is not applicable: UNIQUE indexes in ALTER TABLE

Post: ANALYZE: MyISAM vs Innodb

mysql> alter table antest_innodb type=innodb; Query OK, 245760 rows affected, 1 warning (51.87 sec) Records: 245760 Duplicates: 0 Warnings: 0 mysql

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

mysql: SHOW CREATE TABLE information_schema.innodb_ft_default_stopword\G *************************** 1. row *************************** Table: INNODB_FT_DEFAULT_STOPWORD Create Table: CREATE TEMPORARY TABLE `INNODB_FT_DEFAULT_STOPWORD` ( `value` varchar(18) NOT NULL DEFAULT

Post: Tuning InnoDB Concurrency Tickets

table scan is performed) Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> ALTER TABLE test_table ADDmysql> CREATE TABLE parent (id INT NOT NULL, -> PRIMARY KEY (id) -> ) ENGINE=INNODB; — 0 Tickets Used Query OK, 0 rows affected (0.01 sec) mysql> CREATE TABLE

Post: Joining on range? Wrong!

TABLE `items_ordered` ( `itm_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `itm_prd_id` int(10) unsigned NOT NULL, `itm_order_timestamp` timestamp NOT NULL DEFAULTALTER TABLE items_ordered ADD itm_order_date DATE NOT NULL, ADD

Post: COUNT(*) vs COUNT(col)

TABLE `fact` ( `i` int(10) unsigned NOT NULL, `val` int(11) default NULL, `val2` int(10) unsigned NOT NULL, KEY `i` (`i`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 mysql

Post: Percona testing: Quick test clusters with kewpie!

mysql> create table t1 (a int not null auto_increment, primary key(a)); Query OK, 0 rows affected (0.11 sec) mysql1 | |  4 | |  7 | | 10 | | 13 | +—-+ 5 rows in set (0.00 sec) mysql> exit Bye Should you wish to alter the number