1.

How to write an optimized query in MySQL?

Answer»

To write an optimized query in MySQL, below are some GUIDELINES:

  • Functions should not be USED in PREDICATES.
  • At the beginning of predicates, do not use the wildcard symbols such as %.
  • Use only needed columns in the SELECT clause.
  • Always use the inner join option.
  • Use of the “Order by” clause is NECESSARY for SQL, in CASE of assuming the sorted results.


Discussion

No Comment Found