June 20, 2013

Post: The Optimization That (Often) Isn't: Index Merge Intersection

… indexes on them, MySQL could sometimes make use of the multiple indexes. For instance, … 1. row *************************** id: 1 select_type: SIMPLE table: users type: index_merge possible_keys:… the “InnoDB rows examined” graph had dropped several orders of magnitude and CPU…

Post: MySQL 5.6 vs MySQL 5.5 and the Star Schema Benchmark

…_blocks_time=1000 on MySQL 5.5.30 and testing multiple buffer pools on MySQL 5.5.30. Finally, MySQL 5.6.10 has… promised, here are the results from joining the tables in the other direction mysql> select straight_join sum(lo_extendedprice*lo_discount…_LastDayInMonthFl tinyint, D_HolidayFl tinyint, D_WeekDayFl tinyint ); DROP TABLE IF EXISTS lineorder; CREATE TABLE IF NOT EXISTS lineorder ( LO_OrderKey bigint not…

Post: Join Optimizations in MySQL 5.6 and MariaDB 5.5

MySQL always uses Nested Loop Join to join two or more tables. What this means is that, select rows from first table… case you could be reading the same page multiple times into the buffer pool. So considering this …size were set to 6M, the query time dropped to ~40s. So the maximum possible benefit …

Post: Find and remove duplicate indexes

multiple indexes on the same column and MySQL won’t complain. Let’s see this example: mysql> alter table t add index(name); mysql> alter table… index [...] # To shorten this duplicate clustered index, execute: ALTER TABLE `test`.`t` DROP INDEX `name`, ADD INDEX `name` (`name`); # Key age ends…

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

mysql: SHOW CREATE TABLE innodb_myisam_stopword\G *************************** 1. row *************************** Table: innodb_myisam_stopword Create Table: CREATE TABLE… might expect to get back multiple matches containing the words “James…1, dropped/rebuilt the InnoDB index, and tried again. mysql: …

Comment: Can MySQL temporary tables be made safe for statement-based replication?

… that I have my code surrounded by START TRANSACTION; COMMIT; mysql> SHOW binlog events IN ‘bin-logs.000440′\G *************************** 1. row… that could potentially run this multiple times per session. Interestingly enough, we don’t care if the drop table statement isn’t rolled…

Post: Beware of MyISAM Key Cache mutex contention

tables at very high rate. Hundreds of millions rows are loaded daily into single MySQLtable and so in theory using multiple thread to do inserts in multiple tables would not be bound by tablemultiple key caches . We use “keycache per table” this case and caused number of context switches to drop

Post: Side load may massively impact your MySQL Performance

mysqlmysql-host=localhost –mysql-table-engine=innodb –mysql-db=test –oltp-table-name=md_cache_test_small –oltp-table-size=1100000 –mysql-user=msandbox –mysql-password=msandbox –mysql… sysbench OLTP on small table drops more than 150 times… likely going to have multiple accesses to the data…

Post: Why MySQL could be slow with large tables ?

… grows you may be surprised by serve drop in performance. This especially apples to index …1% of the table. The times for full table scan vs range scan by index: mysql> select count(pad…multiple servers to host portions of data set. Store portion of data you’re going to work with in temporary table

Post: MySQL Server Memory Usage

…memory MySQL will allocate for this operation. Note it is more complicated than once may think – multiple …if done to MyISAM tables. myisam_sort_buffer_size used for ALTER TABLE, OPTIMIZE TABLE, REPAIR TABLE commands. For …I’m quite sure I’ve missed something (drop me a note if you have something to…