Index Advisor
Bytebase provides an index advisor to help you speed up your slow queries. The index advisor will analyze the slow queries and recommend the indexes that can speed up the slow queries.
Prerequisites
The Bytebase index advisor based on the slow query logs and OpenAI API. Make sure that:
- Enable the slow query logs in your database and Bytebase console.
- Enable AI Assistant.
Index Advisor
- Go to home, and click Slow Queries on the left bar.
- Click interested slow query to open the detail page.
- If the index advisor is enabled, you'll see the
- Current Indexes section, which shows the indexes that are currently used by the slow query.
- Suggestions section, which shows the indexes that can speed up the slow query.
- Create Index button, which allows you to create the suggested index.
Data Privacy
Bytebase sends the following info to OpenAI:
- Tables and column names of the current database schema.
- SQL fingerprints without any literals (use question marks ? or variable signs $1 instead).