June 18, 2013

Post: Is your MySQL buffer pool warm? Make it sweat!

…for replication. The buffer pool and adaptive hash index on the standby server will not have …query. (See part two for handling massive slow log volume.) The slow logs are served, via HTTP, …-query command-line option, we set the option innodb_fake_changes to prevent INSERTs, UPDATEs, and DELETEs…

Post: Find unused indexes

INNODB_INDEX_STATS.TABLE_NAME, INNODB_INDEX_STATS.INDEX_NAME from INNODB_INDEX_STATS WHERE CONCAT(INNODB_INDEX_STATS.index_name, INNODB_INDEX_STATS.table_name)NOT IN(SELECT CONCAT(index_statistics.index_name, index…pt-index-usage slow.log slow.log: 11% 03:58 remain slow.log: 21% 03:43 remain slow.log…

Post: MySQL Indexing Best Practices: Webinar Questions Followup

… queries and use key K as covering index for lookup in other direction. For Innodb Table id2 is not needed pas part… on what would be primary key but it also can slow down your inserts and make primary key significantly fragmented. I… IN-ranges in some cases for better index usage. Q: Is the b+ tree innodb index a single or double linked list at…

Post: InnoDB: look after fragmentation

… mysqldump, the query that scans data by primary key was slow. How slow ? Let me show. The query in question is (Q1…: 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: Why MySQL could be slow with large tables ?

… by indexes also could be located sequentially or require radom IO if index ranges are scanned. There are also clustered keys in Innodb which combine index access with data access… large tables, which is completely disk bound can be very slow. One of the reasons elevating this problem in MySQL is…

Post: Improved InnoDB fast index creation

…a slow tmpdir, but rebuilding the indexes will obviously take longer. Another important thing that is worth mentioning is fragmentation. Fast index …must be indexed, so it is impossible to temporarily drop the corresponding index; mysqldump –innodb-optimize-keys ignores the first UNIQUE index on non…

Post: Heikki Tuuri Innodb answers - Part I

… physically sorted indexes with Innodb (with index built by sort) this is when this should be helpful the most. Q3: Does Innodb secondary Indexes trees… where the next index page in the ascending order is. InnoDB has a similar heuristic for descending index scans. The InnoDB sequential read-ahead… which slows down throughput. If we could control the checkpointing rate we could use an 8G write ahead log and tell innodb

Post: SHOW INNODB STATUS walk through

… time object will be free already. OS Waits are relatively slow, and if you get tens of thousands of OS waits…, process no 10099, OS thread id 4078512 starting index read, thread declared inside InnoDB 500 mysql tables in use 1, locked 1… inserts is pretty much insert buffer efficiency. Adaptive hash index is hash index Innodb builds for some pages to speed up row lookup…

Post: Full table scan vs full index scan performance

… employees tables: mysql> ALTER TABLE employees ADD INDEX idx_first (first_name),ENGINE=InnoDB; And then let’s consider this query: SELECT… fast even with slow disks. But when we are using the index, we first have to do a full index scan (fast sequential… be very different if you have slow storage. A full index scan can become interesting when the index is covering. Don’t forget…

Post: My Innodb Feature wishes

…’d like to see Packed indexes. In many cases then difference in Performace with MyISAM and Innodb is huge for read only workload it is caused by the fact Innodb does not have prefix compression for its indexes… many blobs in the same row is going to be slow. For medium sized blobs it would be much better to…