June 20, 2013

Post: MySQL EXPLAIN limits and errors.

… executed – will in add index live as it can now do on Cluster ? Is it expected to rebuild index by sort of key_cache as it can for MyISAM. EXPLAIN may take long time In MySQL 5.0… work with in memory temporary table. The other thing – since MySQL 4.1 sorting can be done with storing row data in…

Post: ALTER TABLE: Creating Index by Sort and Buffer Pool Size

4*SATA disks in RAID10. I used 10mil row table which would look as following in terms of data and index size: mysql… become very slow when index does not fit to memory any more. Creating Index by sort is great Creating index by sort can… run ALTER TABLE which rebuilds the table or OPTIMIZE TABLE do not forget to enable expand_fast_index_creation it can make…

Post: Improved InnoDB fast index creation

…. Let’s start with a table containing 4 million rows and one secondary key: mysql> CREATE TABLE t(id INT AUTO_INCREMENT… table rebuilds without affecting the table size. mysql> SET expand_fast_index_creation=ON; Query OK, 0 rows affected (0.00 sec) mysql> ALTER… table without updating indexes took 18 seconds, and about the same time was spent on rebuilding the index using fast index creation. So we…

Post: Recovering Innodb table Corruption

… with >= MySQL-4.1.1 and stored already) 6353 InnoDB: Page may be an index page where index id is 0 25556 InnoDB: (index “PRIMARY… having data corrupted in secondary indexes, in which case simple OPTIMIZE TABLE could be enough to rebuild it, but it is much…) == dict_index_get_page(index)) InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com…

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

….30 and MySQL 5.6.10 with no configuration tuning other than to set innodb_ft_min_token_size to 4 (rather… we’ve sorted this out, let’s drop and rebuild our FT index on the InnoDB table and try the above queries…_min_token_size to 1, dropped/rebuilt the InnoDB index, and tried again. mysql: SELECT id, full_name, MATCH(full_name, details…

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

rebuild the table. -rw-rw—-. 1 mysql mysql 98304 Feb 20 18:57 FTS_0000000000000025_ADDED.ibd -rw-rw—-. 1 mysql mysqlindexes, it’s entirely possible to DROP multiple FT indexes… +———————-+———-+———-+———-+ 1 row in set (4.60 sec) mysql> select * from information_…

Comment: Why MySQL could be slow with large tables ?

Normally MySQL is rather fast loading data in MyISAM table, but there is exception, which is when it can’t rebuild indexes by… having large (does not fit in memory) PRIMARY or UNIQUE indexes. Below is the internal letter I’ve sent out on….3G, 15.000.000 rows, 512MB memory one the box. MySQL 4.1.8 One could could call it trivial fast task…

Post: Hacking to make ALTER TABLE online for certain changes

rebuild to complete. If you’re unlucky i.e. you have a lot of indexes… swap .frm files while keeping mysql suspended and (4) unlock the tables afterwards: — 1. mysql> CREATE TABLE `huge_table_new`…violate mysql data file structure, so be really careful with that one. Default values. MySQL rebuilds

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

… status | OK | +——–+———-+———-+——————————————————————-+ 2 rows in set (4 min 5.52 sec) mysql> alter table a add key…indexes and bringing box down. You can also use this trick for ALTER TABLE which requires table rebuild. Dropping all indexes

Post: InnoDB: look after fragmentation

… | 5903053 | +—————————+ 1 row in set (2 min 8.92 sec) mysql> SHOW STATUS LIKE ‘Innodb_scan_pages%’; +——————————+——-+ | Variable_name | Value | … is possible in XtraDB / InnoDB-plugin with FAST INDEX creation) so be careful with queries scan …