Free tools Windows power users keep installed
One-click scans. No signup required.
Find slow MySQL queries by combining historical evidence with execution-plan analysis: capture a repeatable slow case in the slow query log or Performance Schema, inspect the optimizer’s estimate with EXPLAIN, measure actual work with EXPLAIN ANALYZE where supported, make the smallest evidence-based change, and measure the same workload again.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
What MySQL query profiling actually tells you
“Slow query” is an observation, not a diagnosis. A statement may exceed its normal response time because it reads too many rows, chooses an unsuitable join order, waits on a lock, performs disk I/O, consumes CPU, or competes with other sessions. Profiling separates those causes instead of treating every delay as an indexing problem.
As an Amazon Associate I earn from qualifying purchases.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →MySQL’s tools answer different questions:
- Slow query log: Which statements historically exceeded your configured time and examined-row thresholds?
- Performance Schema: What did instrumented statements, stages, waits, and server activity actually do?
EXPLAIN: How does the optimizer expect a statement to execute?EXPLAIN ANALYZE: What happened when the statement really ran, including iterator timing, rows, and loops?
Use the first two to find a representative workload, then use the last two to explain it. A plan that looks inefficient is a lead; actual timing and workload measurements determine whether it is the cause.
Start with a repeatable slow case
The Performance Schema guidance starts with a repeatable use case in which performance is considered too slow. Reproducibility matters because a query can be slow once and normal the next time when cache state, data distribution, locks, or concurrent traffic changes.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
Define the symptom
- Record the complete SQL text, including predicates and joins, while removing secrets and personal data from any shared copy.
- Note the database version, schema, approximate table sizes, parameter values, start time, duration, rows returned, and whether the delay is consistent.
- Separate server execution time from application time. Time spent acquiring a connection, serializing results, or waiting in an application queue is not the same as MySQL execution time.
- Capture whether the query is read-only or changes data. This distinction controls which tests are safe.
Run the same statement with representative parameters. A query that is fast for a highly selective customer ID may be slow for a value matching a large fraction of the table; profiling only one parameter can hide that difference.
Use the slow query log for historical discovery
The slow query log records statements that exceed long_query_time and the configured examined-row threshold. It is useful when you do not yet know which query is responsible because it preserves evidence from normal traffic rather than requiring a developer to reproduce a report manually.
For a controlled diagnostic window, an administrator can inspect the current settings and enable logging:
SHOW VARIABLES LIKE 'slow_query_log';
SHOW VARIABLES LIKE 'long_query_time';
SHOW VARIABLES LIKE 'min_examined_row_limit';
SET GLOBAL slow_query_log = 'ON';
SET GLOBAL long_query_time = 1;
The one-second value is an example threshold, not a universal recommendation. Choose a threshold that captures the latency your users actually experience without creating an unmanageable log. Changes made with SET GLOBAL may not persist after a restart unless you also configure the server’s persistent option mechanism for your MySQL release.
After collecting enough traffic to represent the problem, aggregate repeated statements rather than reading every line. The mysqldumpslow utility can summarize a large slow log by normalizing similar statements and showing which patterns consume the most time or executions. Preserve the original log lines when you need exact timestamps, user information, or query text.
Turn the log back down or off when the diagnostic window ends if its volume is not part of your normal observability policy. Logging itself consumes storage and adds administrative work, even though it does not execute the query a second time.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteUse Performance Schema for instrumented measurements
Performance Schema is designed to take real measurements instead of “wild guesses.” It can expose statement activity as well as wait and stage information, allowing you to distinguish time spent running an iterator from time waiting for a lock, file, table, metadata, or another resource.
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
Instrumentation and consumers must be enabled for the data you need. A practical sequence is:
- Choose the repeatable statement or workload and its time window.
- Confirm that statement, wait, and stage instruments relevant to the investigation are enabled.
- Run the workload under representative concurrency.
- Query the Performance Schema summary tables for latency, counts, rows, and wait categories.
- Correlate the statement digest with the application request, host, user, and time period when those dimensions are available.
Performance Schema is especially valuable when the SQL plan appears reasonable but users still report delays. A good plan cannot prevent a session from waiting behind a long transaction or saturating storage. Use the wait and stage data to decide whether to tune SQL or address contention and capacity.
Inspect the optimizer’s proposal with EXPLAIN
MySQL documents EXPLAIN as providing information about how it executes statements. It is a predictive tool: the optimizer estimates cardinalities and costs before execution, so it does not prove how long the query will take under current concurrency.
Run the statement in a safe form
EXPLAIN SELECT
o.customer_id,
SUM(o.total_amount) AS total_amount
FROM orders AS o
WHERE o.created_at >= '2026-01-01'
AND o.status = 'paid'
GROUP BY o.customer_id;
Use the exact production SQL shape when possible. Changing literals, removing a join, or testing an unrepresentative parameter can cause the optimizer to choose a different path.
For machine-readable output, request JSON:
EXPLAIN FORMAT=JSON
SELECT ...;
JSON is useful for automation and for details that are awkward to scan in the traditional tabular output. Save the plan before and after each change so you can identify which decision changed.
Read the important plan fields
- Access type: Identify whether MySQL uses a point lookup, range, index access, or a full table or index scan. A scan is not automatically wrong, but a scan of a large table deserves an explanation.
- Possible and chosen indexes: Compare candidate indexes with the one actually selected. A missing candidate can indicate that the predicate or column order does not match an available index.
- Estimated rows and filtering: These estimates drive cost calculations. Very low estimates can make an expensive join order look attractive.
- Join order and keys: Check which table is read first and how each later table is reached. A poor order can multiply intermediate rows.
- Partitions: If partitioning is used, verify that the plan prunes irrelevant partitions rather than examining all of them.
- Extra operations: Sorts, temporary tables, and other operations can reveal work that is not obvious from the SQL text alone.
Read the plan from the outer query and each nested table or iterator. Do not focus only on the first row of the tabular output; an inexpensive-looking first access can feed millions of rows into a later operation.
Measure actual work with EXPLAIN ANALYZE
EXPLAIN ANALYZE was introduced in MySQL 8.0.18. It executes the statement and reports estimated cost, estimated rows, time to first row, iterator execution time, rows returned, and loop counts. It therefore answers a different question from ordinary EXPLAIN: not “what does the optimizer expect?” but “what happened during this execution?”
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
EXPLAIN ANALYZE
SELECT ...;
Check the syntax and statement support for the exact MySQL version you operate. Documented releases support SELECT and, where supported, multi-table UPDATE, DELETE, and TABLE statements. Support details can change between releases.
Interpret the estimate-versus-actual comparison
- Estimated rows far below actual rows: The optimizer is underestimating cardinality. Investigate stale or skewed statistics, weak selectivity, and correlated predicates.
- Actual time concentrated in one iterator: Tune that iterator or its input first. Rewriting unrelated parts of the query adds risk without addressing the measured cost.
- Many loops with modest per-loop time: The repeated work may be the problem. Inspect the join condition and the index used for each lookup.
- Time to first row is low but total time is high: The query begins producing results quickly but performs substantial work to finish, often because of sorting, aggregation, or a large result set.
- Both estimates and actuals are large: The plan may be accurately predicting expensive work. Reconsider predicates, indexing, selected columns, or whether the query should process that volume.
Protect production data
EXPLAIN ANALYZE runs the statement. Do not casually execute a write statement against production data merely to obtain timing. Prefer a representative read-only form, a restored copy, or a controlled transaction strategy appropriate to the statement and engine. Even a read query can consume CPU, I/O, memory, locks, and connection capacity, so schedule tests and limit concurrency.
For a write query, a transaction rollback is not a universal safety plan: triggers, external side effects, locking behavior, replication, and operational policies may make the test unsafe. Confirm the statement’s effects and your recovery procedure before execution.
Diagnose the common evidence patterns
Large scans on large tables
First check whether the predicate is searchable and whether an index begins with the columns used for filtering or joining. Functions or implicit conversions applied to a column can prevent efficient use of an index. Verify that compared columns have compatible data types and that the condition does not force MySQL to transform every row.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Do not force an index simply because a scan looks unattractive. A full scan can be cheaper when a predicate matches a large share of a small table. Compare plans and actual measurements under representative data before adding a hint.
Bad row estimates
If actual rows greatly exceed estimates, refresh statistics and recheck the plan:
ANALYZE TABLE orders;
Statistics are only one possibility. Skewed values, correlated columns, and predicates whose selectivity depends on another condition can still produce inaccurate estimates. If refreshing statistics changes nothing, examine index design and the predicate shape rather than repeatedly running the same command.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
Exploding intermediate rows or a poor join order
Compare the estimated and actual rows at every join input. Confirm that join columns are indexed on the access side, that the join condition is complete, and that filters are applied before unnecessary row multiplication. A missing or nonselective join predicate can create an intermediate result much larger than the final output.
Recommended Free Tools
When estimates are wrong, fix the information available to the optimizer before attempting a wholesale rewrite. When estimates are accurate but the required result is intrinsically large, reduce the requested time range, pre-aggregate where appropriate, or change the workload design rather than hiding the cost with a hint.
A reasonable plan with unacceptable latency
Move from plan analysis to Performance Schema. Inspect waits and stages for lock contention, I/O, CPU pressure, metadata waits, and concurrency effects. The SQL may be efficient in isolation while the service is slow because sessions are queued behind another transaction or the host is saturated.
Apply the smallest evidence-based fix
Change one material factor at a time and preserve the old plan and measurements. Typical fixes include:
- Add or adjust an index that starts with selective filter or join columns and follows the access pattern actually shown in the plan.
- Remove unnecessary columns and joins so fewer rows and bytes move through the plan.
- Rewrite a costly predicate or function so the indexed column can be compared directly.
- Correct mismatched data types that cause conversions during comparisons.
- Refresh table statistics when the estimate-versus-actual evidence indicates stale information.
- Reduce an avoidable full scan, sort, temporary result, or repeated lookup identified in the plan.
Every index has write, storage, and maintenance costs. Before adding one, check existing indexes for overlap and verify that the proposed column order serves the slow predicate and common neighboring queries. After the change, test both the target query and important write workloads.
Compare profiling approaches before choosing a test
| Method | Evidence type | Scope | Production characteristics | Important limitation |
|---|---|---|---|---|
| Slow query log | Historical statements exceeding configured time and examined-row thresholds | Query pattern over a traffic window | Low-friction discovery; does not execute statements for analysis | Needs an appropriate threshold and log review; does not explain waits or iterator costs by itself |
| Performance Schema | Measured statement, stage, and wait activity | Server and application workload | Supports production measurements when instrumentation is selected and overhead is acceptable | Requires relevant instruments and consumers to be enabled; interpretation depends on the collected dimensions |
| EXPLAIN | Optimizer estimates and proposed access path | One statement | Predictive and safer than executing a write for timing | Estimates can be wrong and it does not measure runtime contention |
| EXPLAIN ANALYZE | Actual iterator timing, rows, loops, and estimate comparison | One executed statement | High diagnostic value; use controlled testing because it runs the query | Available from MySQL 8.0.18 and subject to version-specific statement support; execution has real resource and data effects |
An end-to-end profiling runbook
- Choose the incident window. Define the user-visible latency, affected endpoint or report, representative parameters, and concurrency level.
- Find candidates historically. Use the slow query log and summarize repeated patterns with
mysqldumpslow, or identify statement digests and timing in Performance Schema. - Confirm reproducibility. Run the exact SQL shape with representative values and record duration, rows, and environment conditions.
- Capture a baseline plan. Save traditional
EXPLAINoutput and, when useful,EXPLAIN FORMAT=JSON. - Measure actual work. Run
EXPLAIN ANALYZEfor a safe read-only test or on an isolated representative system, checking version support first. - Locate the dominant cost. Compare estimated and actual rows, identify the slow iterator, and inspect join order, scans, sorts, temporary work, and loops.
- Check non-plan causes. Use Performance Schema waits and stages when lock, I/O, CPU, or concurrency effects could explain the delay.
- Make one targeted change. Adjust an index, predicate, statistics, or query shape only when the evidence supports it.
- Repeat the same measurement. Use the same parameters and workload conditions, then compare latency, rows, loops, waits, and plan shape.
- Validate operationally. Test neighboring queries, writes, replication behavior, storage use, and rollback procedures before treating the change as complete.
Troubleshooting branches when profiling stalls
The slow log contains too much data
Raise or narrow the collection threshold for a short window, summarize normalized patterns, and retain the raw lines for the few candidates you investigate. A log full of routine statements makes the exceptional query harder to identify.
The slow log contains nothing useful
Check that logging is enabled, that long_query_time and the examined-row threshold are not excluding the incident, and that you are inspecting the correct server and time window. If the delay is caused by waiting, statement execution may not cross the threshold you expected; Performance Schema wait data can reveal that distinction.
Best Value
EXPLAIN chooses an unexpected index
Compare candidate indexes, estimated selectivity, data distribution, and statistics. Confirm that the tested parameter resembles the production value. Refresh statistics when warranted, then re-run the plan. Use an index hint only after measuring that the optimizer’s choice is consistently harmful for the real workload.
EXPLAIN ANALYZE is unavailable
Verify the deployed MySQL version and statement type. MySQL introduced the feature in 8.0.18, and documented support is not identical for every statement or release. Use ordinary EXPLAIN, slow-log timing, and Performance Schema measurements where actual-plan execution is unavailable.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsThe query is fast in a test copy but slow in production
Compare data volume, value distribution, indexes, statistics, configuration, hardware, cache state, transaction age, and concurrent sessions. A copied plan is not a copied workload. Production Performance Schema data is the appropriate evidence for lock and resource contention that an isolated test cannot reproduce.
Use optimizer trace as a supplement, not a verdict
Optimizer trace can add detail about decisions that are summarized in EXPLAIN. It is useful when you need to understand why an access path, join order, or alternative was rejected. MySQL warns that trace format and content can change between versions, so treat it as diagnostic output tied to the server version rather than a stable interface for long-term automation.
Trace does not replace runtime measurement. Pair it with the slow log, Performance Schema, and—when safe and supported—EXPLAIN ANALYZE so an explanation of the optimizer’s choice is checked against actual work.
Validate results without overclaiming
There is no universal percentage improvement that applies to every MySQL query. Timing depends on data, hardware, cache state, concurrency, and workload shape. Report the before-and-after conditions with the result: statement version, parameter set, number of repetitions, server version, and whether the measurement was isolated or taken under production traffic.
A successful optimization is one that improves the target workload without unacceptable regressions elsewhere. Keep the baseline plan, the changed plan, actual timing, row counts, wait data, and rollback path. If the same query is slow only during contention, the correct fix may be transaction or capacity management rather than another index.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

