http://www.orafaq.com/wiki/Explain_Plan
http://www.psoug.org/reference/trace_analyzer.html
SQL> EXPLAIN PLAN FOR select * from dept where deptno = 40;
Explained.
SQL> set linesize 132
SQL> SELECT * FROM TABLE(dbms_xplan.display);
PLAN_TABLE_OUTPUT
---------------------------------------------------------------------------------------
Plan hash value: 2852011669
---------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
---------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 20 | 1 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| DEPT | 1 | 20 | 1 (0)| 00:00:01 |
|* 2 | INDEX UNIQUE SCAN | PK_DEPT | 1 | | 0 (0)| 00:00:01 |
---------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access("DEPTNO"=40)
14 rows selected.
==============================================
SQL> SET AUTOTRACE ON
SQL> select * from dept where deptno = 40;
DEPTNO DNAME LOC
---------- -------------- -------------
40 OPERATIONS BOSTON
Execution Plan
----------------------------------------------------------
Plan hash value: 2852011669
---------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
---------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 20 | 1 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| DEPT | 1 | 20 | 1 (0)| 00:00:01 |
|* 2 | INDEX UNIQUE SCAN | PK_DEPT | 1 | | 0 (0)| 00:00:01 |
---------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access("DEPTNO"=40)
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
2 consistent gets
0 physical reads
0 redo size
443 bytes sent via SQL*Net to client
374 bytes received via SQL*Net from client
1 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
Friday, June 20, 2008
Thursday, June 12, 2008
Incompatibilities Setup for Request Sets
------------------------------------------------
1. When setting up Request Set, check the 'Incompatibility Allowed' box.
=> This will create a Concurrent Program Name 'Request Set'
2. Go to Define Concurrent Program - query on the above generated concurrent programs. => Hit Incompatibilities button. Enter the Request Set Name to be incompatible to itself.
-------------------------------------------------
9. Are you having problems with incompatibilities?
In order for incompatibilities to function correctly the "Incompatibility
Allowed" checkbox must be checked. This will create a unique Concurrent
Program which can be used as the basis for making a program incompatible.
The name of this Concurrent Program is as follows:
Release 10.7
Program = Report Set
ShortName = FNDRSSUB
Release 11.0
A new field has been introduced named "Report Set Code". This code is used
when defining incompatibilities. It has no required format. Stages also
have the unique name "Stage Code"
=> Set
Program = Report Set
ShortName = FNDRSSUB
=> Stage
Program = Report Set Stage - Request Set
ShortName = Stage Code
Additional Information:
Documentation:
Release 11
Oracle Applications Release 11 - System Administrator's Guide
(Part #: A58194-01) Chapter 6 - Pages 6-1 to 6-16
Oracle Applications Develpoper's Guide Release 11 (Part #: A58187-01)
Chapter 22 - Pages 22-1 to 22-6
Release 10.7
Oracle Applications Release 10SC - System Administrator's Guide
(Part #: A23416-3) Chapter 6 - Pages 6-1 to 6-16
1. When setting up Request Set, check the 'Incompatibility Allowed' box.
=> This will create a Concurrent Program Name 'Request Set
2. Go to Define Concurrent Program - query on the above generated concurrent programs. => Hit Incompatibilities button. Enter the Request Set Name to be incompatible to itself.
-------------------------------------------------
9. Are you having problems with incompatibilities?
In order for incompatibilities to function correctly the "Incompatibility
Allowed" checkbox must be checked. This will create a unique Concurrent
Program which can be used as the basis for making a program incompatible.
The name of this Concurrent Program is as follows:
Release 10.7
Program = Report Set
ShortName = FNDRSSUB
Release 11.0
A new field has been introduced named "Report Set Code". This code is used
when defining incompatibilities. It has no required format. Stages also
have the unique name "Stage Code"
=> Set
Program = Report Set
ShortName = FNDRSSUB
=> Stage
Program = Report Set Stage
ShortName = Stage Code
Additional Information:
Documentation:
Release 11
Oracle Applications Release 11 - System Administrator's Guide
(Part #: A58194-01) Chapter 6 - Pages 6-1 to 6-16
Oracle Applications Develpoper's Guide Release 11 (Part #: A58187-01)
Chapter 22 - Pages 22-1 to 22-6
Release 10.7
Oracle Applications Release 10SC - System Administrator's Guide
(Part #: A23416-3) Chapter 6 - Pages 6-1 to 6-16
Wednesday, June 11, 2008
Singleton
http://www.javacoffeebreak.com/articles/designpatterns/index.html
A singleton is an class that can be instantiated once, and only once. This is a fairly unique property, but useful in a wide range of object designs. Creating an implementation of the singleton pattern is fairly straightforward - simple block off access to all constructors, provide a static method for getting an instance of the singleton, and prevent cloning.
public class SingletonObject
{
private SingletonObject()
{
// no code req'd
}
public static SingletonObject getSingletonObject()
{
if (ref == null)
// it's ok, we can call this constructor
ref = new SingletonObject();
return ref;
}
public Object clone()
throws CloneNotSupportedException
{
throw new CloneNotSupportedException();
// that'll teach 'em
}
private static SingletonObject ref;
}
So why would this be useful? Often in designing a system, we want to control how an object is used, and prevent others (ourselves included) from making copies of it or creating new instances. For example, a central configuration object that stores setup information should have one and one only instance - a global copy accessible from any part of the application, including any threads that are running. Creating a new configuration object and using it would be fairly useless, as other parts of the application might be looking at the old configuration object, and changes to application settings wouldn't always be acted upon.
A singleton is an class that can be instantiated once, and only once. This is a fairly unique property, but useful in a wide range of object designs. Creating an implementation of the singleton pattern is fairly straightforward - simple block off access to all constructors, provide a static method for getting an instance of the singleton, and prevent cloning.
public class SingletonObject
{
private SingletonObject()
{
// no code req'd
}
public static SingletonObject getSingletonObject()
{
if (ref == null)
// it's ok, we can call this constructor
ref = new SingletonObject();
return ref;
}
public Object clone()
throws CloneNotSupportedException
{
throw new CloneNotSupportedException();
// that'll teach 'em
}
private static SingletonObject ref;
}
So why would this be useful? Often in designing a system, we want to control how an object is used, and prevent others (ourselves included) from making copies of it or creating new instances. For example, a central configuration object that stores setup information should have one and one only instance - a global copy accessible from any part of the application, including any threads that are running. Creating a new configuration object and using it would be fairly useless, as other parts of the application might be looking at the old configuration object, and changes to application settings wouldn't always be acted upon.
My First Journey
This blog will start the beginning of my technical journey to learn java, gwt, xml and oracle.
Subscribe to:
Comments (Atom)