Monday, July 19, 2010

Performance Improvement - Part 2: Hard parse is not bad

Performance Improvement - Part 2: Hard parse is not bad In previous post, we have seen the soft parsing is doing less operation comparing with hard parsing.Please have a look on below post before read this one.http://karthikeyanbaskaran.blogspot.com/2010/07/performance-improvement-part-1-parsing.htmlThe Hard parse includes the parse, optimize, generation of the plan for the query and soft parse skips optimize and generation of the plan. So we decided...

Tuesday, July 13, 2010

Performance Improvement - Part 1: Parsing

Performance Improvement - Part 1: Parsing In this article, we see how to improve the performance of the SQL queries. Before that we should know about the parsing and types of that.Parsing:This is the first step in the processing of any statement in Oracle. Parsing is the process of breaking the submitted statement down into its component parts. Determining what type of statement it is (whether Query, DML, DDL) and performing various checks on it.The...

Monday, July 5, 2010

Reusable scripts - Part1

Find the letter occurrences in the statement: The below query is finding the number of occurrence letter “a” in the string.select length('Find a letter in a string') - length(replace('Find a letter in a string', 'a','')) as "Number of occurrence" from dual ;Number of occurrence--------------------2Remove the alphabetic letters in the given string:declarel_start number;len number;i number;p_str varchar2(1000) := 'aa123yksjds45';p_str1 varchar2(1000);res varchar2(1000);begini:=0;len :=length(p_str);WHILE i <= len loop len := ASCII(substr(p_str,i,1));...