Why Does the SQL Performance of a LIMIT Query Statement Vary Greatly with Different Numbers Following LIMIT?
This may be caused by uneven data distribution (data skew). The LIMIT query ends after the number of rows that meet the condition is found.
For example, when LIMIT X is used, few rows are scanned. When LIMIT X+10 is used, the number of rows to be scanned increases significantly.
In TaurusDB, you can add EXPLAIN ANALYZE before SELECT…LIMIT… and then execute the statement. This allows the SELECT statement to be executed directly and provides detailed information on the time taken for each step during execution. You can check the number of rows scanned and processed in each step by observing the rows value in the output of the statement.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot