June 19, 2013

Post: Replication in MySQL 5.6: GTIDs benefits and limitations - Part 1

…new features regarding replication in MySQL 5.6. They …one master and two slaves, all running MySQL 5.6 …mysql> create table test.t (id int not null auto_increment primary keyfield, Auto_Position: # Slave #1 mysql> show slave status\G [...] Auto_Position: 1 -> GTID-based positioning # Slave #2 mysql

Post: Finally. How to verify if all MySQL records were recovered

…the same question arises: How many MySQL records were recovered and how many…are organized in an unidirectional list. The list is sorted by primary key and …up with the supremum record then two conclusions can be make: The …records. It checks whether fields have permitted values, etc. In the end it …

Post: How to recover table structure from InnoDB dictionary

PRIMARY KEY (`INDEX_ID`,`POS`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 Fields names explain their content. Index id in our example is 1679: mysql

Post: MySQL Indexing Best Practices: Webinar Questions Followup

… and make primary key significantly fragmented. I also would note there are some MySQL optimizer restrictions in how well it can deal with primary key appended… Table1′s primary key. Should table2 have an index on the field that is used to join the two tables? A: The question in this…

Post: How to recover deleted rows from an InnoDB Tablespace

In this case, there are two indexes with the IDs 0-26 and 0-27. InnoDB has Clustered Primary KeyFIELDS: emp_no from_date [...] The second method has the same result, 0-26 is our primary key. After identifying the Primary Keyin our hands the last step is to import it in our database: mysql (…

Post: Connecting orphaned .ibd files

… different files. Usually system tablespace is located in ibdata1 file and every InnoDB table has two files e.g. actor.frm and…, PRIMARY KEY (`TABLE_ID`,`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 Please note field SPACE. For table actor it is equal to 15: mysql> select…, PRIMARY KEY (actor_id), KEY idx_actor_last_name (last_name) )ENGINE=InnoDB DEFAULT CHARSET=utf8; This command will create respective records in SYS…

Post: Recover BLOB fields

…(120), `N_FIELDS` int(10), PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 Here COMPACT format is used, which is default in MySQL >= 5.1. The record consists of four parts: Offsets. Effectively these are field lengths. Only variable length… one or two bytes depending on maximum field size. The highest bit of the offset is 1 if the field is stored in external…

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

fields to use ENUM column type, but is it really necessary (from performance standpoint)? Inkeys: PRIMARY key: PRIMARY key_len: 1 ref: test.c.state_id rows: 1 Extra: 2 rows inMySQL to store Join result in

Post: Shard-Query EC2 images available

in the comments of the last post. ICE does not have any indexes (not even primary keys…shown in the EC2 console. That the “private ip” field is selected in…one or two nodes. You should start two workers per core in the …3306 socket=/tmp/mysql-inno.sock [mysqld] socket=/tmp/mysql-inno.sock default…

Post: MySQL-Memcached or NOSQL Tokyo Tyrant - part 1

…getting a really solid # of hits in memcached, but the # of writes in MySQL coupled with the still large …from a database based on an integer based primary key B.) Update data from that row and …row in another table based on a text field ( called email address ). Seems simple enough right? My two