June 18, 2013

Post: Ultimate MySQL variable and status reference list

auto_increment_incrementblogpercona.commanual auto_incrementalter_db_upgradeblogpercona.commanual Com_alter_eventblogpercona.commanual Com_alter_functionblogpercona.commanual Com_alter_procedureblogpercona.commanual Com_alter_serverblogpercona.commanual Com_alter_tableblogpercona.commanual Com_alter

Post: MySQL Users Conference - Innodb

… UNIQUE indexes built by sorting in case of ALTER TABLE (the big Gotcha for MyISAM tables). Are there any plans to be able…. Improved Auto Increment handling Yet another known Innodb problem is table locks which are taken for statement duration for Inserts with auto-increment column. This…

Post: Statement based replication with Stored Functions, Triggers and Events

… previous steps but in this case we alter every event adding DISABLE ON SLAVE. ALTER EVENT even_name DISABLE ON SLAVE. LOCAL…-22.1. AUTO INCREMENTAL VALUES In order to have the same auto incremental values on master and slaves the actual used auto incremental value is logged… and we have gaps? Example: Imagine the table has this values on the auto incremental column: 1,2,3,5 Then we execute…

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

… then I create one, the following warning is generated: mysql> alter table dir_test_innodb ADD FULLTEXT KEY (full_name, details); Query… get an error: mysql> CREATE TABLE dir_test_innodb4 (fts_doc_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY); ERROR 1166 (42000… sort of sequence value for that column, whether as an auto_increment value or via some other means, but the bit that…

Comment: Database problems in MySQL/PHP Applications

… using auto_increment functionality This is right. With some > exception however. For example Innodb tables do internal full table > lock if auto_increment is…> becomes managable, your ALTER TABLE or OPTIMIZE TABLE > now locks small table for few seconds rather than giant 100GB table > for few hours…

Comment: Duplicate indexes and redundant indexes

table if exists emp; drop table if exists dept; create table dept ( deptid integer auto_increment primary key, deptname varchar(20) ); create table emp ( empid integer auto_incrementalter table

Comment: Spreading .ibd files across multiple disks; the optimization that isn't

… SSD. ALTER TABLE will work correctly, etc. Now consider that there are two sets of tables in the_db, transactional tables and log tables, and… table the_db.trx1(c1 int auto_increment, c2 int, c3 int, primary key(c1))engine=innodb; create table the_db.trx2(c4 int auto_increment, c1 int, key(c1), c5 int) engine=innodb; — c1 is FK to t1 create table the_db.log(log_id int auto_increment

Comment: Sharing an auto_increment value across multiple MySQL tables

… only N most recent items): create table some_sharded_table( shard_key int, some_child_key bigint auto_increment not null, key(some_child… keys to shards. You can then partition `some_sharded_table` nicely: alter table some_sharded_table partition by hash(shard_key) partitions 16; All…

Post: Joining on range? Wrong!

… directory consisting of three very simple tables: CREATE TABLE `products` ( `prd_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `prd_name` varchar(32) NOT… introducing additional DATE column and using it for filtering instead: ALTER TABLE items_ordered ADD itm_order_date DATE NOT NULL, ADD…

Post: Database problems in MySQL/PHP Applications

… Not using auto_increment functionality This is right. With some exception however. For example Innodb tables do internal full table lock if auto_increment is …data becomes managable, your ALTER TABLE or OPTIMIZE TABLE now locks small table for few seconds rather than giant 100GB table for few hours …