May 25, 2012

Post: Recovering Innodb table Corruption

… why do not you simply rebuild table by using OPTIMIZE TABLE ? This is because Running in innodb_force_recovery mode Innodb becomes read only for…) == dict_index_get_page(index)) InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB: If… to make sure indexes are not corrupted. So we looked at how to get your data back from simple Innodb Table Corruption. In…

Post: Thinking about running OPTIMIZE on your Innodb Table ? Stop!

… you from using LOCK TABLES on Innodb table to ensure there is not ton of queries starting reading table with no indexes and bringing box down. You can also use this trick for ALTER TABLE which requires table rebuild. Dropping all indexes; doing…

Post: Improved InnoDB fast index creation

table without updating indexes took 18 seconds, and about the same time was spent on rebuilding the index using fast index creation… TABLE STATUS versus 265 MB index size with the optimization disabled. OPTIMIZE TABLE OPTIMIZE TABLE is mapped to ALTER TABLE … ENGINE=InnoDB for InnoDB tables

Post: Hacking to make ALTER TABLE online for certain changes

…’s InnoDB or MyISAM, you’d usually ALTER TABLE `huge_table` CHANGE `id` `id` int(6) NOT NULL and then wait hours for table rebuild to complete. If you’re unlucky i.e. you have a lot of indexes and not too…_incremental from the table. As a rule of thumb, this usually involves altering huge InnoDB tables and huge tables take time to rebuild. Disclaimer: try…

Post: Innodb vs MySQL index counts

… Baron) was adverse to trusting INNODB_SYS_INDEXES from some bad experiences with it, and suggested the Innodb Table monitor instead, see my …: ALTER TABLE table_name ENGINE=Innodb; This, of course, rebuilds the whole table based on the .frm table definition and removes the existing index in Innodb, …

Post: InnoDB: look after fragmentation

…=InnoDB Table has 11864696 rows and takes Data_length: 698,351,616 bytes on disk The problem is that after restoring table from…: 38530 InnoDB_IO_r_bytes: 631275520 InnoDB_IO_r_wait: 0.204893 # InnoDB_rec_lock_wait: 0.000000 InnoDB_queue_wait: 0.000000 # InnoDB_pages… control it (tough it is possible in XtraDB / InnoDB-plugin with FAST INDEX creation) so be careful with queries scan many records…

Post: My Innodb Feature wishes

… be much faster as well as ALTER TABLE (expecially together with ability to create index without table rebuilding) Buffer pool improvements. I would like… and promoting real one to unique. Tablespaces. To call “innodb_file_per_table” option tablespaces is a joke. It is better than…

Post: Heikki Tuuri answers to Innodb questions, Part II

…. Q37: We have a fairly large Innodb table (150GB) that is showing poor performance for full table scans. using O_DIRECT, we are… run to show any table / index fragmentation, without having to run the OPTIMIZE? HT: Since OPTIMIZE rebuilds the whole table, it may last way… adaptive hash indexes are not used for primary key lookups or not showed up in “show innodb status”. select * from table where…

Post: Recovering CREATE TABLE statement from .frm file

… corresponding .frm files of InnoDB tables, or you have moved .frm files to another database? or, the table contains indexes that this version of… help. Type ‘\c’ to clear the buffer. mysql> show create table test_innodb; +————-+—————————————————————————————————————————-+ | Table | Create Table… need to be exist. The intuitive way to rebuild MyISAM table would be REPAIR TABLE test_myisam USE_FRM, however it does not…

Post: What to do with MySQL Full Text Search while migrating to Innodb ?

… migration is Full Text Search indexes which are not supported for Innodb tables. So what can you do ? Leave Tables as MyISAM The beauty… evils. Use “Shadow” MyISAM Table You can keep main data in Innodb but build a “shadow” MyISAM table which is used for full… on the writes. In this case you can just rebuild the table from Innodb source on regular basics. In case you can afford…