How do you optimize SQL queries ?

Answer Posted / asr

Avoid the sub queries.
Where condition should be based on primary key and index,
use primary column for join.
Try to avoid more tables.
Use temp tabels.
Create procedure.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Enlist the advantages of sql.

573


What is identity column in sql server?

534


What is sqlite used for?

533


What is java sql connection?

516


Is left join and outer join same?

552






Explain spool.

691


What is the syntax and use of the coalesce function?

602


What is java sql package?

539


Name the different types of indexes in sql and define them.

570


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.

1143


what is heap table? : Sql dba

610


i have a column which may contain this kind of value: 123*67_80,12*8889_5,34*8_874 ,12*7_7 (can contain space before a comma, and this string length can be anything) now i want to split this value into two column like: column1: 123*67,12*8889,34*8,12*7 column2: 80,5,874,7 use function for this

1067


Explain the uses of control file.

617


Differences between Oracle 9i and 10g (Probably in terms of SQL and PL/SQL)?

3109


Does sap use sql?

518