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 !!?
Answers were Sorted based on User's Feedback
Answer / manoj
1.
Use proper sequence of tables in from clause
i.e.
the table have more common column must in last
in form clause bcoz on firing of query engine link
last table in form clause
2.
Use "Exist" clause instead of "Not in"
Bcoz it return only true/false(boolean)
3.
Use "Hint" if Required
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / sathishrpillai
Hii..
for optimization of sql query
1.don't use select * from,choose particular fields itself
2.don't use both OR ,AND in same query
3.Minimise the use of aggreagate functions such sum,count
4.don't link unneccessary tables
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / 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 |
can i create trigger on synonym is it possible or not please help me
how to delete duplicate rows from a specified table(only single table) how do you know which join is need to be used
What is synchronized subquery?
Is sql microsoft?
What is the difference between partitioning and sharding?
What is the sql case statement?
Explain the commit statement.
- Types of triggers - View - Dcl - Procedures, packages, functions - Metasolve - Can use Dcl in triggers - package case study - Cursor and its types - triggers schedule - Wrap - Why we are using fetch and for in cursor. difference?
What is pivot query?
How can we store rows in PL/SQL using array?
What are the different types of dbmss?
What is pl/sql table? Why is it used?