TestingMySQLFULLTEXTindexesinInnoDBusingpt-upgrade_MySQL-mysql tutorial

Source: Internet
Author: User
Upload-upgrade As I prepare to convert some MySQL tables with FULLTEXT indexes from MyISAM to InnoDB I want to verify that running a standard production query set against the tables will return the same results with InnoDB that it did with MyISAM. since I read Matt Lord 'sblog postabout the document relevancy rankings used for InnoDB full-text searches I knew to specific Ct some differences when sorting by relevancy, so I want to focus on getting the same set of rows back, mostly ignoring the order in which the rows are returned.

Percona toolkit has a tool calledpt-upgradethat works well for this purpose. I used 2 test servers with a copy of my production database. on one of the servers I left the tables in MyISAM, and on the other I converted the tables to InnoDB. I copied a slow query log from a production host runninglong_query_time=0To get the query set for testing. since I was only interested in queries on a few tables, rather than running the entire slow query log against the servers I just extracted the specific queries I was interested in and ran them as a raw log.

Here's the command I used:

pt-upgrade --read-only /--database flite /--type rawlog /tmp/proddb-slow.log.raw /h=testdb33.flite.com /h=testdb47.flite.com

I used--read-onlyFlag sopt-upgradeWocould only executeSELECTStatements, and not any statements that modify data.

Since I extracted the SQL queries from the slow query log instead of using the full slow query log, I used--type rawlogInstead of the default--type slowlog.

For the two hosts I compared, testdb33 is using FULLTEXT on InnoDB, and testdb47 is using FULLTEXT on MyISAM.

When I ranpt-upgradeIt exposed several significant discrepancies. I will document those discrepancies and how I fixed them in a future post.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.