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
How to add new employee details in an employee_details table with the following details
What is sql trigger example?
Differentiate between syntax and runtime errors.
What does sql stand for?
what is dbms? : Sql dba
What is group function in sql?
How do you delete duplicates in sql query using rowid?
Which is faster union or join?
What is pragma in sql?
Why stored procedure is faster than query?
How many clustered indexes can be created on a table?
What is the difference between clustered and non-clustered index in sql?
Can a table contain multiple primary key’s?
How many joins in sql?
What is the difference between microsoft access and sql?