More MySQL Merge Table Ramblings

Playing with merge tables in MySQL, I discovered a new tidbit that we didn’t cover in Performance Tuning Class.? If you are interested in this post, you probably know that a MERGE table allows you to address many identical subtables underneath it without having to write sql for each subtable.? Well, I discovered that not only do the subtables need to be indexed, but you have to apply those indexes to the merge table to.? Since it simply acts as an interface to the subtables, I assumed the indexes on the subtables, would handle stuff, but these indexes must be in the MERGE table too or it will simply do a full table scan.? That will slow you down considerably every time!

Tags: , ,

Leave a Reply

*

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!