Adaptive Cursor Sharing:   This document will explain step by step to analyze adaptive cursor sharing. Let’s start with the basics. Let’s create a table as a copy of dba_objects.   SQL> create table t as select * from dba_objects; Now, if we run a query like ‘select object_name from… Continue Reading Adaptive Cursor Sharing

First we need to load data SQL> alter session set tracefile_identifier=’ABC’; Session altered. Elapsed: 00:00:00.01 SQL> alter system set events ‘10046 trace name context forever, level 12′; System altered. Elapsed: 00:00:00.18 SQL> create table t1(c1 number,c2 char(2000)); Table created. Elapsed: 00:00:00.03 SQL> set autotrace on; SQL> set autotrace traceonly; SQL>… Continue Reading Comparison between exadata and non-exadata executions test case

Logical IO vs Physical IO vs Consistent gets I have created 1 GB table T1.   Let me check how many blocks are there in the table after I have analyzed it.   SQL> select BLOCKS from user_tables where table_name=’T1′;    BLOCKS ———-    139153   Autotrace report Let me clean buffer… Continue Reading Logical IO vs Physical IO vs Consistent gets oracle

I referred some reference from my favorite Tim Hall blog (ORACLE_BASE) A.Basic of optimizer statistics: – The optimizer cost model relies on statistics collected about the objects involved in a query, and the database and host where the query runs. Statistics are critical to the optimizer’s ability to pick the… Continue Reading Oracle 12c gather statistics oracle deep dive

What is PGA The Program Global Area (PGA) is a private memory region that contains the data and control information for a server process. Only a server process can access the PGA. Oracle Database reads and writes information in the PGA on behalf of the server process. An example of… Continue Reading Oracle PGA (Program Global Area) in 12c

Clustering Factor and it’s effect on non-assm and assm tablespace. The clustering factor is a measure of the ordernesss of an index in comparison to the table that it is based on. It is used to check the cost of a table lookup following an index access (multiplying the clustering… Continue Reading Clustering Factor and it’s effect on non-assm and assm tablespace

A. B-Tree Indexes I have discussed more details in the below blog. http://clouddba.co/index-internal-oracle-using-simple-test-case/ B.Invisible Indexes Deciding which columns to index is hard. The primary key is automatically indexed, the foreign keys should also be indexed, but then what? Even more difficult is deciding which index to remove that might be… Continue Reading Index in 12c by example test case

How histogram can affect query plan change hence performance. 1.Let me create a test case.I am loading the table with following distribution.Obviously it means data is somewhat skewed. Value:-1 Range:-10 Value:-2 Range:-100 Value:-3 Range:-1000 Value:-4 Range:-10000 Value:-5 Range:-100000 C##TEST@TESTDB1> create table tt1(c1 number,c2 char(10)); Table created. C##TEST@TESTDB1> declare begin for… Continue Reading How histogram can affect query plan change hence performance