The optimal indexes for this query are ...
By default, the database cannot use indexes on columns used as function parameters, e.g. MONTH(date) = 5.
You can index the these statements by creating and indexing virtual columns:
Please create these indexes before executing the optimized query:
The following indexes already exist in your database and were found as useful for optimal query performance:
We’re glad you’re enjoying EverSQL!
Wasn't it better than looking for a DBA to get your queries optimized?
Upgrade to supercharge more of your SQL queries.
Advanced capabilities for Plus and Enterprise customers
Our advanced capabilities and insights are available for Plus and Enterprise subscribers.
Please consider upgrading to unlock these advanced capabilities.
Your optimized query is ready!
Sign up to get it for freeOptimizing a SQL query
Tell us about your database:
Please submit the SELECT query you would like to optimize:
Our AI-powered optimizer is far more accurate when provided with the database metadata. Please export the metadata and submit the output file below.
* The information you provide is encrypted and protected. Learn more on our security page.
Our AI-powered optimizer is far more accurate when it has informatiion about your database metadata. Please execute this query and submit the output.
Copy SQL query to fetch metadata* Database metadata was last updated: X days ago.
Please paste the output below, or click here to upload as a file.
* The information you provide is encrypted and protected. Learn more on our security page.
You're missing out! Users who submit their metadata get up to 60% better recommendations.
Query Performance Trend
Resubmit a query for optimization
Please adjust the query's syntax and re-submit it for optimization:
Installing EverSQL Performance Sensor
EverSQL performance sensor will track your databases slow query logs on an on-going basis and generate personalized optimization insights for you automatically. You can use the performance sensor with MySQL, MariaDB and Percona databases.
Step 1: Enable the slow query log
The performance sensor requires slow query logs to be enabled.
Click here for instructions if you don't have them enabled.
To enable slow query logs, please add the following parameters to MySQL's configuration file. By default, the configuration file is at /etc/my.cnf, or at /etc/mysql/my.cnf.
[mysqld]
slow_query_log=1
long_query_time=1 # Logs queries longer than 1 second
log_output=FILE
slow_query_log_file=/var/lib/mysql/slow.log
To apply the changes, please restart the database (requires short downtime):
sudo /etc/init.d/mysql restart
Step 2: Install the performance sensor
To install the performance sensor, please run the following commands.
If your slow query log file is not at /var/lib/mysql/slow.log, please modify the path below.
curl https://www.eversql.com/install/ubuntu_18_04 > install_sensor
sudo bash -x install_sensor /var/lib/mysql/slow.log
Once installed, the sensor will start sending identified slow queries within a few minutes.
EverSQL performance sensor will track your databases slow query logs on an on-going basis and generate personalized optimization insights for you automatically. You can find more information here.
You can use the performance sensor with Amazon RDS MySQL / RDS MariaDB / Aurora MySQL databases.
Step 1: Enable the slow query log
To enable slow query logs on your database instances, please follow the 'Enable slow query log' section here.
Once you're done editing the parameter group and assigning it to your instance, please make sure you restart the database to apply the changes (may require downtime).
Step 2: Install the performance sensor (Beta)
You can now deploy the performance sensor from the Amazon Serverless Application repository.
Your personal API key (required as part of the installation):
Once installed, the sensor will start sending identified slow queries within a few minutes.
Hi, these are the next insights you should focus on to speed up your database:
-
Reduce up to XX% of the workload by optimizing the top 10 slow queries.
-
XX new slow queries introduced this week. Any new features deployed?
-
Improve performance by removing these XX redundant indexes.
Database optimization checklist
-
1. Optimize a SQL query
👏 -
2. Upload the database metadata
👏







Query Fingerprint | Duration Sum | Duration Avg | Count | Trend | Trend | Tags | Last Seen | Status | Actions |
---|
Best practices for optimal performance
The slow query:
Hi, please tell us which database you're using:





Amazon RDS
Amazon EC2
GCP Compute
GCP SQL
Azure VM
Azure DB
On-premises

Other

Focal (v20.04)

Bionic (v18.04)

Xenial (v16.04)

Trusty (v14.04)

Buster (v10)

Stretch (v9)

Jessie (v8)

Redhat

Ubuntu

Centos

Debian

Fedora

OpenSUSE

Windows

Other OS
|
||
|
||
|