June 19, 2013

Post: Ultimate MySQL variable and status reference list

create_eventblogpercona.commanual Com_create_functionblogpercona.commanual Com_create_indexblogpercona.commanual Com_create_procedureblogpercona.commanual Com_create_serverblogpercona.commanual Com_create_tableblogpercona.commanual Com_create

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

… InnoDB table that has never had a full-text index on it, and then I create one, the following warning is generated: mysql> alter tableindexes, it’s entirely possible to DROP multiple FT indexes with InnoDB in the same ALTER TABLE statement, but it’s not possible to CREATE more than one at a time. If you try it, this is what happens: mysql> alter table dir_test…

Post: Converting Character Sets

CREATE TABLE `t1`\G *************************** 1. row *************************** Table: t1 Create Table: CREATE TABLEALTER statement against the table in Approach #1: ALTER TABLE

Post: pt-online-schema-change and default values

…=sbtest Altering `sbtest`.`sbtest`… Creating new tableCreated new table sbtest._sbtest_new OK. Altering new tableAltered `sbtest`.`_sbtest_new` OK. Creating triggers… Created triggers … SELECT `id`, `k`, `c`, `pad` FROM `sbtest`.`sbtest` FORCE INDEX(`PRIMARY`) WHERE ((`id` >= ?)) AND ((`…

Comment: Concatenating MyISAM files

… ‘ALTER TABLE x ADD/DROP INDEX‘, which rewrites the whole .MYD. CREATE TABLE z LIKE x; — duplicate the structure of the original table. ALTER TABLE z DROP INDEX PRIMARY, DROP INDEX my_idx, ADD INDEX PRIMARY ( f1…

Post: Data compression in InnoDB for text and blob fields

…bytes of variable length columns (BLOB, VARCHAR, TEXT) in the index record, and the remainder stored in overflow pages.  COMPACT …existing tables with an ALTER TABLE statement. As table compression is table specific, ROW_FORMAT and KEY_BLOCK_SIZE directives are passed via CREATE TABLE or ALTER TABLE

Post: ANALYZE: MyISAM vs Innodb

… difference of behavior of ANALYZE TABLE for MyISAM vs Innodb. I used the following simple table for tests: CREATE TABLE `antest` ( `i` int(10… index prefix is unique (245900 is estimate for the row count in the table) It is worth to note if you do ALTER TABLE Innodb, same as MyISAM will internally run analyze as soon as table is rebuilt and values will be more sensible: mysql> alter table

Post: Tuning InnoDB Concurrency Tickets

… the corresponding number of concurrency tickets used for each: mysql> CREATE TABLE test_table ( -> id int -> ) ENGINE=InnoDB; — 0 Tickets Used Query OK… sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> ALTER TABLE test_table ADD INDEX (id); — 5 Tickets Used Query OK, 3 rows affected…

Comment: MySQL Server Memory Usage

…’2416986544′ ‘Com_admin_commands’, ’76′ ‘Com_alter_db’, ’0′ ‘Com_alter_table‘, ’7′ ‘Com_analyze’, ’0′ ‘Com_backup_table‘, ’0′ ‘Com_begin’, ’0′ ‘…’, ’0′ ‘Com_commit’, ’9558970′ ‘Com_create_db’, ’0′ ‘Com_create_function’, ’0′ ‘Com_create_index‘, ’0′ ‘Com_create_table‘, ’31′ ‘Com_dealloc_sql’, ’0′ ‘…

Post: SHOW INNODB STATUS walk through

tables locked by transactions. Innodb does not lock tables for normal operation so number of tables locked normally stays 0, unless it is ALTER TABLEindex. You can also see number of hash index lookups and number of non-hash index lookups which is indication of hash index