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

hi,i plan to put experience on PLSQL ,can anyone suggest me for any institutes in bangalore or how to prepare for interviews

1533


Which is faster count (*) or count 1?

548


First round ------------------- - Procedure - Packages - Views - Virtual tables - Can we use dcl with in function? - Joins and few scenarios - Triggers and its type - Pragma, type and its functionality - How to create db link in oracle - Materialized view - How to find duplicate values from table? - Cursor and its functionality - Write a script to display friday and its date from a entire year. - Exception Handling Second round ------------------------ Gave a scenario like. Need to write a function to perform. When user try to change a password. It must not be last five password and a given password can be combination of characters, symbols, upper and lower case.

1149


can a stored procedure call itself or recursive stored procedure? : Sql dba

586


what is schema? : Sql dba

569






What is the difference between inner join and natural join?

517


Why do we use partitions in sql?

549


Is sql a programming?

552


Can dml statements be used in pl/sql?

585


how would you enter characters as hex numbers? : Sql dba

524


Can we alter stored procedure?

551


Explain the working of foreign key?

552


Which table is left in join?

522


Can we use threading in pl/sql?

523


What is java sql connection?

518