Help Center/
Distributed Database Middleware/
User Guide (ME-Abu Dhabi Region)/
FAQs/
SQL Syntax/
How Do I Optimize SQL Statements?
Updated on 2022-02-22 GMT+08:00
How Do I Optimize SQL Statements?
- You are advised to use INNER instead of LEFT JOIN or RIGHT JOIN.
- When LEFT JOIN or RIGHT JOIN is used, ON is preferentially executed, and WHERE is executed at the end. Therefore, when using LEFT JOIN or RIGHT JOIN, ensure that the conditions are judged in the ON statement to reduce the execution of WHERE.
- When possible, use JOIN instead of subqueries to avoid full scanning of large tables.
Parent topic: SQL Syntax
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.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot