On this page

Show all

Help Center/ Distributed Database Middleware/ FAQs/ SQL Syntax/ How Do I Optimize SQL Statements?

How Do I Optimize SQL Statements?

Updated on 2022-09-16 GMT+08:00
  • 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.
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback