How do you optimize SQL queries ?
Answer Posted / hutashan
Avoid implicit datatype conversion
Avoid using function on an indexed column
Avoid comparing column value with NULL
Outer Join
Use OR carefully
Always use NOT EXISTS instead of NOT IN
Use UNION ALL whenever possible (no implicit sorts)
UNION will sort the result set for each SELECT before
combining the final result set
Remove DISTINCT keyword from SELECT if UNION is used
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
Why do we use subquery?
What are triggers and its uses?
What is case function?
What is meant by user defined function?
What are the advantages of stored procedure?
Does sql backup shrink transaction log?
Is sql better than access?
What is the difference between left outer join and left join?
Can a table have no primary key?
what is an index? : Sql dba
what are date and time functions in mysql? : Sql dba
What is foreign key in sql with example?
How do you explain an index?
What are the types of operators available in sql?
What does cursor do in sql?