Can any one tell me how to increase the performance of a
sql query ie what are the performance tips in creating or
writing a sql query !!?

Answer Posted / hutashan

use Inline view to eleminate large number of rows
Avoid implicit datatype conversion
Avoid using function on an indexed column
Avoid comparing column value with NULL
Outer Join
Use OR carefully

Do not use outer join unless absolutely necessary. Degree
of optimizing outer join permutation is VERY LIMITED
Instead: Consider using default values in the base table to
avoid outer join
Do not outer join to a view. This typically results in a
non-mergable view execution plan
Always use NOT EXISTS instead of NOT IN


Remove DISTINCT keyword from SELECT if UNION is used

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is relationship? How many types of relationship are there?

592


What are the two parts of design view?

583


Is not null in sql?

560


What are the different parts of a package?

635


explain the difference between myisam static and myisam dynamic. : Sql dba

519






What is the sql query to display the current date?

551


What is where clause in sql?

536


Can sql function call stored procedure?

558


How do you write a complex sql query?

589


what is data control language? : Sql dba

588


Can we call procedure in select statement?

520


What are the parts of a sql statement?

555


Are stored procedures faster than dynamic sql?

535


What are the different types of constraints?

566


Do stored procedures prevent sql injection?

551