June 20, 2013

Post: MySQL Query Patterns, Optimized - Webinar questions followup

multiple joins vs. multiple queries (e.g. temp tables)? For performance, it’s hard to make a general rule, because there are differentmultiple columns in a compound index, then the order would matter, and it would have to match the order of columns

Post: Why MySQL could be slow with large tables ?

difference. Here is little illustration I’ve created the table with over 30 millions of rows. “val” column in this tableselects about 1% of the table. The times for full table scan vs range scan by index: mysql> select count(pad) from

Post: Multiple column index vs multiple indexes

multiple columns: Q1 SELECT sum(length(val)) FROM T WHERE i=2 AND j=1 Q2 SELECT sum(length(val)) FROMtables to show what difference large BETWEEN can make. Conclusion: For benchmarked queries we can see Multiple Column

Post: Flexviews - part 3 - improving query performance using materialized views

column. It is used to prevent wide innodb primary keys on the MV. mysql> selectmysql> select sum(total_lines) cnt from dashboard_top_customers\G *************************** 1. row *************************** cnt: 155187034 1 row in set (0.03 sec) Notice the difference

Post: Wow. My 6 year old MySQL Bug is finally fixed in MySQL 5.6

column and I would expect “Impossible Where clause” here Lets look at query execution: | Handler_read_next | 1305742982 | mysql> select count(*) frommultiple table and the column type was inconsistent between them… so inserts into one table

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

… often have tables with lots of single-column indexes on columns which commonly …columns that had single-column indexes on them, MySQL could sometimes make use of the multiple indexes. For instance, “SELECT foo FROM… not look too bad. MySQL is using three different indexes to search approximately …

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 tablemultiple times. Consider if you have a small buffer pool and a very large number of rows from

Post: Multi Column indexes vs Index Merge

MySQL does not know it as it looks at stats from differentmultiple column indexes. This is in case you’re using OR between the columns. In this case the combined index is useless and MySQL

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

mysql: SELECT id, title, MATCH(title, body) AGAINST (‘arizona business records’ IN NATURAL LANGUAGE MODE) AS score FROM

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

TABLE, and that we might have to run OPTIMIZE TABLE multiple times if we’ve had a lot of changes to the tablemysql> set global innodb_ft_aux_table=’test/dir_test_innodb’; mysql> set global innodb_optimize_fulltext_only=1; mysql> select * from