You are on page 1of 2

Tuning:http://www.orafaq.com/tuningguide/ http://beginner-sql-tutorial.com/sql-query-tuning.htm http://www.smart-soft.co.uk/Oracle/oracle-tips-and-tricks.htm#.Uh7gFhswfcg -- Ne ed To check Query Plan :http://www.dwbiconcepts.com/database/22-database-oracle/26-oracle-query-plan-a-1 0-minutes-guide.html Normalization:http://databases.about.com/od/specificproducts/a/normalization.htm Data base basics:http://databases.about.com/od/administration/u/database_basics.htm Collections:http://www.oracle.com/technetwork/issue-archive/2012/12-jul/o42plsql-1653077.htm l http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/collections.htm http://psoug.org/reference/array_processing.

html *If the TYPE statement contains an INDEX BY clause, the collection type is an as sociative array. *If the TYPE statement contains the VARRAY keyword, the collection type is a var ray. *If the TYPE statement does not contain an INDEX BY clause or a VARRAY keyword, the collection type is a nested table. *Only the associative array offers a choice of indexing datatypes. Nested tables as well as varrays are always indexed by integer. *When you define a varray type, you specify the maximum number of elements that can be defined in a collection of that type. Cursors:http://www.oracle.com/technetwork/issue-archive/2013/13-mar/o23plsql-1906474.htm l When fetching a single row, use SELECT-INTO or EXECUTE IMMEDIATE-INTO (if your q uery is dynamic). Do not use an explicit cursor or a cursor FOR loop. When fetching all the rows from a query, use a cursor FOR loop unless the body o f the loop executes one or more DML statements (INSERT, UPDATE, DELETE, or MERGE ). In such a case, you will want to switch to BULK COLLECT and FORALL. Use an explicit cursor when you need to fetch with BULK COLLECT, but limit the n umber of rows returned with each fetch. Use an explicit cursor when you are fetching multiple rows but might conditional ly exit before all rows are fetched. Use a cursor variable when the query you are fetching from varies at runtime (bu t isn t necessarily dynamic) and especially when you need to pass a result back to a non-PL/SQL host environment. Use EXECUTE IMMEDIATE to query data only when you cannot fully construct the SEL ECT statement while writing your code. Try to use Bulkcollect first, if not go for FOR LOOP Cursor,if not go for EXPLIC IT Cursor IN & Exists:http://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:953229842074 If subquery returns small subset , IN is appropriate as Joins will be less.

If subquery returns larger no:of rows , Exists is appropriate.

You might also like