Query Optimization Techniques - Tips For Writing Efficient And Faster SQL Queries

preview_player
Показать описание
Tip #1:
Use Column Names Instead of * in a SELECT Statement

Tip #2:
Avoid including a HAVING clause in SELECT statements

Tip #3:
Eliminate Unnecessary DISTINCT Conditions

Tip #4:
Un-nest sub queries

Tip #5:
Consider using an IN predicate when querying an indexed column

Tip #6:
Use EXISTS instead of DISTINCT when using table joins that involves tables having one-to-many relationships

Tip #7:
Try to use UNION ALL in place of UNION

Tip #8:
Avoid using OR in join conditions

tip #9:
Avoid functions on the right hand side of the
operator
Tip #10:
Remove any redundant mathematics
Рекомендации по теме