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

how to create a new view in mysql? : Sql dba

486


What are different types of sql?

551


What are the ways on commenting in a pl/sql code?

509


What are functions in sql?

500


Why are sql stored procedures used?

607






how can we know the number of days between two given dates using mysql? : Sql dba

537


What is a join?

613


What is a table partition?

581


what is a composite key ? : Sql dba

584


What does over partition by mean in sql?

519


How to connect a sql*plus session to an oracle server?

612


What are basic techniques of indexing?

835


what is rdbms? : Sql dba

570


How many aggregate functions are available there in sql?

519


how tsql statements can be written and submitted to the database engine? : Transact sql

520