Paste a slow SQL query and get specific index recommendations to speed it up.
Audit database queries during development before they hit production.
Optimize MySQL database performance without manually analyzing query plans.
Requires compiling from C source and having a MySQL environment available.
SQLAdvisor is a tool built by the database administration team at Meituan-Dianping, a large Chinese technology company. Its job is to look at a SQL query (the kind of command used to ask questions of a database) and suggest which indexes should be added to make that query run faster. An index in a database is a bit like the index at the back of a book: it helps the database find rows quickly without scanning through everything. The tool parses the SQL using MySQL's own syntax rules, then examines the filtering conditions, grouping operations, and any joins between tables to figure out what indexes would help most. You give it a SQL statement and it tells you what to add. It does not run the query itself or modify your database, it only produces recommendations. SQLAdvisor was developed for internal use at Meituan-Dianping and is widely deployed there. The company later open-sourced it, and the internal and public versions are kept in sync. Documentation, including a quick-start guide, an architecture overview, release notes, and development guidelines, is available in the project's doc folder. Bugs and feature requests can be reported through GitHub issues. The README is written in Chinese and the documentation links also lead to Chinese-language pages.
← meituan-dianping on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.