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
What is schema in sql?
Is natural join and inner join same?
What is sql architecture?
how to use regular expression in pattern match conditions? : Sql dba
What are the possible values for the boolean data field?
How do I debug a stored procedure?
what is column? : Sql dba
What are the types of index in sql?
Is it possible to read/write files to-and-from PL/SQL?
What is a loop in sql?
How to pipe multiline string to isql?
how to convert character strings to numeric values? : Sql dba
What is dynamic sql in pl sql?
What is a native sql query?
What are the different set operators available in sql?