June 19, 2013

Post: Joining many tables in MySQL - optimizer_search_depth

… making it unusable to check the optimizer performance. Solution for this problem was to use set optimizer_search_depth=0, rarely used option which as per manual will chose best value automatically. Making this change I could bring optimization… makes Timour explanation somewhat conflicting though as if we assume MySQL users do not join lots of tables (less than 7…

Post: MySQL Indexing Best Practices: Webinar Questions Followup

… benefits and drawbacks. Benefit being you can get extra optimizations by optimizer knowing index is UNIQUE the drawback is insert buffer will… key significantly fragmented. I also would note there are some MySQL optimizer restrictions in how well it can deal with primary key… comparison as a search condition WHERE A=5 ORDER BY B will use index (A,B) for sorting optimization, for more complicated…

Post: Ultimate MySQL variable and status reference list

… to the amazing MySQL manual, especially the option and variable reference …definitionsblogpercona.commanual Opened_tablesblogpercona.commanual optimizer_prune_levelblogpercona.commanual optimizer_search_depthblogpercona.commanual optimizer_switchblogpercona.commanual partitionblogpercona.commanual…

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

…-text search in MySQL 5.6 (part 1) in MySQL 5.6 is syntactically identical to MyISAM full-text search, … optimize_start_time | | | optimize_end_time | | | stopword_table_name | | | use_stopword | 1 | | table_state | 0 | +—————————+———+ 10 rows in set (0.02 sec) mysql> optimize

Post: ORDER BY ... LIMIT Performance Optimization

… know on high end custom search solutions can be developed, but if we stick to simple MySQL using multiple indexes on most… it is indexed) Force index if needed In some cases MySQL Optimizer may prefer to use different index, which has better selectivity… solution for this problem is ether extending your indexes so MySQL Optimizer does not have to chose between better sort or better…

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

… glance, this might not look too bad. MySQL is using three different indexes to search approximately 8100 out of 4.5M rows… the context of index merge, it means that MySQL is really looking at a search space closer to 8.5M rows, not… a few possibilities: A new version of MySQL is released that has some new optimizer functionality that you end up missing out…

Post: Getting around optimizer limitations with an IN() list

…? Anyone out there created a zipcode database and created a “search within x numer of miles” function ? Thankful for any tips… scale. To understand why these sorts of geographic search queries are problematic in MySQL, it’s best to show some execution plans… reason for this is simply a missing feature of the MySQL optimizer – and it has to do with using x BETWEEN 30…

Post: Index Condition Pushdown in MySQL 5.6 and MariaDB 5.5 and its performance impact

… comparing the optimizer enhancements in MySQL 5.6 and MariaDB 5.5. We are taking a look at and benchmarking optimizer enhancements one… post is aimed at a new optimizer enhancement Index Condition Pushdown (ICP). Its available in both MySQL 5.6 and MariaDB 5…

Post: Using delayed JOIN to optimize count(*) and LIMIT queries

… would see main (fact) table which contains search fields and dimension tables which contain more information …+———-+ | count(*) | +———-+ | 30720 | +———-+ 1 row in set (0.00 sec) mysql> select count(*) from fact; +———-+ | count(*) | +———-+ | 7340032 | +———-+ 1 row…

Post: Web Site Optimization: FrontEnd and BackEnd

…. We often deal with people with less than optimized backends with some pages (search,reports etc) taking minutes to load which makes these few seconds you can shave off by client side optimization secondary… and only 10% fetching data from MySQL database it does not make sense to focus on MySQL optimization. If 90% is spent on…