Tuning Oracle query
Hi,
when I run this query:
SELECT a.*, d.C1
FROM t1 a, t2 b, t3 c, t4 d
WHERE C2 IS NOT NULL
AND C1 > '0005'
AND a.C3 = b.C4
AND NOT EXISTS (
SELECT *
FROM t5
WHERE C5 = C2
AND C6 = DECODE (b.C7,'AB', 0,
'BC', '555',
a.C3
AND a.C2 = c.C5
AND a.C8 = d.C8;It is taking lot of time (more 1 hour), I need some suggestions how to tune it.
I have noticed that If I remove the "NOT EXISTS" clause the query becomes very fast.
I'd like to know How Can I write more efficient query, and speed up existing code.
Thanks in advance!
Below ddl and explan plan of the query:
CREATE TABLE t4
ID_C NUMBER NOT NULL,
C1 VARCHAR2(14 BYTE)
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 103K| 12M| | 451K (1)| 01:30:17 |
|* 1 | FILTER | | | | | | |
|* 2 | HASH JOIN | | 103K| 12M| | 57064 (1)| 00:11:25 |
| 3 | TABLE ACCESS FULL | t2 | 66 | 528 | | 3 (0)| 00:00:01 |
| 4 | NESTED LOOPS | | 103K| 11M| | 57059 (1)| 00:11:25 |
|* 5 | HASH JOIN | | 106K| 11M| 3440K| 57051 (1)| 00:11:25 |
|* 6 | TABLE ACCESS FULL | t4 | 106K| 2188K| | 2012 (2)| 00:00:25 |
|* 7 | TABLE ACCESS FULL | t1 | 6343K| 568M| | 22970 (2)| 00:04:36 |
|* 8 | INDEX UNIQUE SCAN | SYS_C0020000 | 1 | 6 | | 1 (0)| 00:00:01 |
|* 9 | TABLE ACCESS BY INDEX ROWID| t5 | 1 | 9 | | 4 (0)| 00:00:01 |
|* 10 | INDEX RANGE SCAN | IDX_C | 1 | | | 2 (0)| 00:00:01 |
----------------------------------------------------------------------------------------------------------
Similar Messages
-
Query on using Variables in Oracle Query
Hi
i am new to Oracle, i have tried extracting data from the Oracle Database using the following Query which includes 1 variable SYSDATE_UTS, however when i try to execute the Query i get an error. Please let me know what am i doing wrong and how can i correct it.
Error Message
ORA-06550: line 4, column 1:
PLS-00428: an INTO clause is expected in this SELECT statement
Oracle Query
DECLARE SYSDATE_UTS NUMBER := (sysdate-to_date('19700101','yyyymmdd'))*86400;
BEGIN
SELECT
INCIDENT_NUMBER,
to_date(to_char((1/86400*REPORTED_DATE)+to_date('19700101','yyyymmdd'),'mm/dd/yyyy hh24:mi:ss'),'mm/dd/yyyy hh24:mi:ss') as REPORTED_DATE_TIME,
,GROUP_TRANSFERS
,LAST_MODIFIED_BY
,to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * LAST_MODIFIED_DATE,'mm/dd/yyyy hh24:mi:ss'),'mm/dd/yyyy hh24:mi:ss') as LAST_MODIFIED_DATE
,(to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) as AGE
,CASE
WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) BETWEEN 0 AND 1 THEN '0-1 Days'
WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * SYSDATE_UTS, 'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) BETWEEN 2 AND 4 THEN '2-4 Days'
WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) BETWEEN 5 AND 9 THEN '5-9 Days'
WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) BETWEEN 10 AND 19 THEN '10-19 Days'
WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) >20 THEN '20+ Days'
ELSE 'UNKNOWN'
END AS AGE_GROUP
FROM IncidentDataBase
and STATUS not in (4,5,6)
and rownum <10;
END;Hi Frank
i am using the following Oracle Version
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
and Quest Toad for Oracle to write and execute the queries:
Toad for Oracle Xpert
Version 10.1.1.8
The code i am using is:
variable SYSDATE_UTS NUMBER;
exec SYSDATE_UTS := (sysdate-to_date('19700101','yyyymmdd'))*86400;
SELECT
INCIDENT_NUMBER,
to_date(to_char((1/86400*REPORTED_DATE)+to_date('19700101','yyyymmdd'),'mm/dd/yyyy hh24:mi:ss'),'mm/dd/yyyy hh24:mi:ss') as REPORTED_DATE_TIME
,GROUP_TRANSFERS
,LAST_MODIFIED_BY
,to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * LAST_MODIFIED_DATE,'mm/dd/yyyy hh24:mi:ss'),'mm/dd/yyyy hh24:mi:ss') as LAST_MODIFIED_DATE
,(to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * :SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) as AGE
,CASE
WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * :SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) BETWEEN 0 AND 1 THEN '0-1 Days'
WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * :SYSDATE_UTS, 'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) BETWEEN 2 AND 4 THEN '2-4 Days'
WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * :SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) BETWEEN 5 AND 9 THEN '5-9 Days'
WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * :SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) BETWEEN 10 AND 19 THEN '10-19 Days'
WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * :SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) >20 THEN '20+ Days'
ELSE 'UNKNOWN'
END AS AGE_GROUP
FROM IncidentDataBase
WHERE STATUS not in (4,5,6)
and rownum <10;
Notes:
1. When i put the cursor before "variable" (starting of the query) and execute the script i get an Error: ORA-00900: invalid SQL statement.
2. When i put the cursor just before "SELECT" i get a pop up.
a. it is a Toad window which displays the available variables (in this case :SYSDATE_UTS).
b. gives me a dropdown option to select the type (by default VARCHAR2 is selected).
c. there is a value field where i need to enter the value for the Variable.
d. the SQL statement shown in this dilog box does not include the 1st 2 lines
variable SYSDATE_UTS NUMBER;
exec SYSDATE_UTS := (sysdate-to_date('19700101','yyyymmdd'))*86400;
Q: is there something wrong in the syntax i am using?
Sven W. - I have been using your method all these days, which works just fine. i wanted to know how i could use a variable instead.
Business Requirement - My whole intent is to calculate the Age of an incident (Difference between "Reported Date" and current date) and to assign Age Groups (0-1 Days, 2-4 Days,....,20+ Days).
Edited by: 921713 on Mar 19, 2012 12:23 PM -
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
Report Builder 10.1.2.0.2
ORACLE Server Release 10.1.0.4.2
Oracle Procedure Builder 10.1.2.0.2
Oracle ORACLE PL/SQL V10.1.0.4.2 - Production
Oracle CORE 10.1.0.4.0 Production
Oracle Tools Integration Services 10.1.2.0.2
Oracle Tools Common Area 10.1.2.0.2
Oracle Toolkit 2 for Windows 32-bit platforms 10.1.2.0.2
Resource Object Store 10.1.2.0.2
Oracle Help 10.1.2.0.2
Oracle Sqlmgr 10.1.2.0.2
Oracle Query Builder 10.1.2.0.2 - Production
PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
Oracle ZRC 10.1.2.0.2
Oracle XML Developers Kit 10.1.0.4.2 - Production
Oracle Virtual Graphics System 10.1.2.0.2
Oracle Image 10.1.2.0.2
Oracle Multimedia Widget 10.1.2.0.2
Oracle Tools GUI Utilities 10.1.2.0.2
I have enclosed sample data and also table structure. I need help in getting the query.
select dept_id,proc_code,override_goal,goal_override_date
from table2
where goal_override_date between '02-jan-2014' and '11-jan-2014'
and dept_id = 10
and proc_code = 'CP'
select DEPT_ID, PROC_CODE, DAY_SUNDAY, DAY_MONDAY,
DAY_TUESDAY, DAY_WEDNESDAY, DAY_THURSDAY,
DAY_FRIDAY, DAY_SATURDAY
from table1
where dept_id =10
and proc_code = 'CP';
Table1 is kind of maintenance table.
In Table2 values can be overridden.
Requirement
Check to see if there is data in table 2 for the date range . If table2 has no value then take value from table1 for that day the date falls into. Any more clarification please ask me.
Sundays are all zeros.
I want this data. and the sum for the date range.
2-jan-2014 - 3
3-jan-2014 - 3
4-jan-2014 - 3
5-jan-2014 - 0
6-jan-2014 - 1
7-jan-2014 - 3
8-jan-2014 - 5
9-jan-2014 - 5
10-jan-2014 - 3
11-jan-2014 - 3
Sum for the date range has to be 29
Sample table and data
CREATE TABLE TABLE1
DEPT_ID NUMBER NOT NULL,
PROC_CODE VARCHAR2(2 BYTE) NOT NULL,
DAY_SUNDAY NUMBER(4) NOT NULL,
DAY_MONDAY NUMBER(4) NOT NULL,
DAY_TUESDAY NUMBER(4) NOT NULL,
DAY_WEDNESDAY NUMBER(4) NOT NULL,
DAY_THURSDAY NUMBER(4) NOT NULL,
DAY_FRIDAY NUMBER(4) NOT NULL,
DAY_SATURDAY NUMBER(4) NOT NULL
Insert into TABLE1
(DEPT_ID, PROC_CODE, DAY_SUNDAY, DAY_MONDAY, DAY_TUESDAY,
DAY_WEDNESDAY, DAY_THURSDAY, DAY_FRIDAY, DAY_SATURDAY)
Values
(10, 'CP', 0, 3, 3,
3, 3, 3, 3);
COMMIT;
CREATE TABLE TABLE2
DEPT_ID NUMBER NOT NULL,
PROC_CODE VARCHAR2(2 BYTE) NOT NULL,
OVERRIDE_GOAL NUMBER(4),
GOAL_OVERRIDE_DATE DATE NOT NULL
Insert into TABLE2
(DEPT_ID, PROC_CODE, OVERRIDE_GOAL, GOAL_OVERRIDE_DATE)
Values
(10, 'CP', 1, TO_DATE('01/06/2014 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
Insert into TABLE2
(DEPT_ID, PROC_CODE, OVERRIDE_GOAL, GOAL_OVERRIDE_DATE)
Values
(10, 'CP', 3, TO_DATE('01/07/2014 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
Insert into TABLE2
(DEPT_ID, PROC_CODE, OVERRIDE_GOAL, GOAL_OVERRIDE_DATE)
Values
(10, 'CP', 5, TO_DATE('01/08/2014 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
Insert into TABLE2
(DEPT_ID, PROC_CODE, OVERRIDE_GOAL, GOAL_OVERRIDE_DATE)
Values
(10, 'CP', 5, TO_DATE('01/09/2014 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
Insert into TABLE2
(DEPT_ID, PROC_CODE, OVERRIDE_GOAL, GOAL_OVERRIDE_DATE)
Values
(10, 'CP', 3, TO_DATE('01/10/2014 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
Insert into TABLE2
(DEPT_ID, PROC_CODE, OVERRIDE_GOAL, GOAL_OVERRIDE_DATE)
Values
(10, 'CP', 3, TO_DATE('01/11/2014 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
COMMIT;
Help is highly appreciated.SELECT dates,
override_goal,
SUM(override_goal) OVER()
FROM(SELECT dates,
CASE WHEN EXISTS(SELECT 1
FROM table2 t2
WHERE t2.goal_override_date = qry1.dates
AND t2.dept_id = 10
AND t2.proc_code = 'CP')
THEN (SELECT override_goal
FROM table2 t2
WHERE t2.goal_override_date = qry1.dates
AND t2.dept_id = 10
AND t2.proc_code = 'CP')
ELSE (SELECT DECODE(days,'SUN',day_sunday,
'MON',day_monday,
'TUE',day_tuesday,
'WED',day_wednesday,
'THU',day_thursday,
'FRI',day_friday,
'SAT',day_saturday )
FROM table1)
END as override_goal
FROM (SELECT in_dt1+(LEVEL-1) dates,
TO_CHAR(in_dt1+(LEVEL-1),'DY') days
FROM(SELECT TO_DATE(&from_date,'DD-MON-YYYY') in_dt1,
TO_DATE(&to_date,'DD-MON-YYYY') in_dt2
FROM dual)
CONNECT BY LEVEL <= (in_dt2 - in_dt1)+1) qry1);
Now run the query it will prompt you for the inputs. You can pass the date values and check the result. Otherwise replace &from_date,&to_date with user inputs -
How to enforce index in oracle query
Hi all
how to enforce index in oracle query
RegardsUse INDEX hint to force Optimizer to use the specfied index.
You really need to investigate why Optimizer doesn't choose the index. Remember, INDEX SCAN are not always GOOD.
Jaffar -
Please can you help me in Tuning this query..?
Hi ,
Please can you help me in re-structuring this query? .Details are given below.
I have 2 tables as shown below and data is like this.
Position
COD IND
AAA N
BBB N
CCC N
DDD Y
Distance
orig dest
AAA BBB
BBB CCC
AAA CCC
I need to create the records like this
start end
DDD AAA
DDD BBB
DDD CCC
The query which i am using now for this is
select p.code AS start,
P1.CODE AS end
from position p, position p1
where
P.CODE != P1.CODE
AND (P.ind = 'Y' or P1.IND = 'Y')
AND not exists
(select 1
from distance d
where (d.orig = p.code or d.dest = p.code)
and (d.orig = p1.code or d.dest = p1.code))
table is having above a crore record. so its taking a lot of time.
Please someone please help in tuning this query?
Thanks and regards,
ShabirLooks like you want this
select a.strt, b.ends from
(select p.code strt from position p where p.ind='Y') a,
(select p.code ends from position p where p.ind='N') b
where not exists (select 1 from distance d where d.orig=a.strt or d.dest=a.strt);
DDD AAA
DDD BBB
DDD CCCYour query result is:
AAA DDD
BBB DDD
CCC DDD
DDD AAA
DDD BBB
DDD CCCYou should be more descriptive about what kind of result you want, so that people can get more interested in helping you. -
Passing parameters to oracle query
Hi Everyone,
I'm a newbie to oracle and need help passing parameters to an oracle query. For example, I need to show all the employees in a certain department.So a list of "DEPT_CODE"'s will be displayed on a webpage and then the selected value will be passed to the query. I currently have this query in MS Access and use the bracket for user input ("[Dept]"). But how can this be done in oracle?
I am using ASP.NET 2.0 and Crystal Reports XI. Basically I have a webform where users can select the date range and department from a listbox. When the submit button is clicked, the values are passed to the query in crystal reports. For example, I have a query with "DEPT" as a parameter. So I pass the value of the selected listbox item from the webform to the crystal report. But now I have to select data from an oracle database and provide parameters. This is where I need help.
Thanks in advance
-SamDuplicate post.
Refer to this thread
Passing parameters to oracle query -
Hi,
Can anybody please help me in tuning this query?
update tablec c set c.col1 = (select b.col1 from tableb b where c.col2 = b.col2 ) where
c.col2 in (select distinct a.col1 from tablec a, tableb b where a.col2 = b.col2 and a.col1 != b.col1 )
When i use "alter session force parallel DML" before running this query it takes only seconds, but when i use parallel hint or run it without hint, its running for hours.
Thanks for your HelpHi itssan,
You could try EXISTS.
I think this is the same:
update tablec c
set c.col1 =
(select b.col1
from tableb b
where b.col2 = c.col2)
where exists (select null
from tablec a, tableb b
where a.col2 = b.col2
and a.col1 != b.col1
and a.col1 = c.col2);Regards
Peter -
Hi,
I need to run an Oracle query with the following fields in the AWR report:
First Query:
DB Name
Begin Snap Time
End Snap Time
Begin Snap
End Snap
Event
Waits
Time(s)
Avg wait (ms)
% DB time
Wait Class
Second Query:
DB Name
Begin Snap Time
End Snap Time
Begin Snap
End Snap
Elapsed Time (s)
Executions
Elapsed Time per Exec(s)
%Total
%CPU
%IO
SQL Id
SQL Module
SQL Text
How Can I write this query?
Thanks in advance!R.Royal wrote:
Thanks,
I know how to generate an AWR report but I would like to write a query that takes these fields from oracle views. (DBA_ or V$)
And the link I sent to you shows you the views required to do that.
Cheers, -
Please help me in tuning this query. This view has around 2 million of records
SELECT * FROM employee_v
WHERE status_id IN (SELECT MAX(v2.status_id)status_id
FROM employee_v v2
WHERE UPPER(v2.name) LIKE UPPER(:v_name)||'%'
GROUP BY v2.emp_id, v2.project_id)
ORDER BY status_type_id;
Here:
employees may work on one or more projects
employee working on a given project may have one or more status_ids associated.
for example:
emp_id project_id status_id
10 100 1
10 100 2
20 100 2
20 200 3
30 100 4
30 200 5
30 200 6
40 200 6
If you have any other suggestions , please let me know too. For example, I was thinking that the subquery should use actual tables instead of the view because view is based on 10 tables and the subquery can instead use two tables . Does it make sense?
Thanks a lot for the help!
Edited by: user5406804 on Apr 20, 2010 5:42 AMIf you have any other suggestions , please let me know too. Wild shot in the dark, but maybe using EXISTS instead of IN speeds up your query:
untested for obvious reasons
select *
from employee_v v
where upper(v.name) like upper(:v_name)||'%'
where not exists ( select null
from employee_v v2
and v2.status_id > v.status_id
and v2.emp_id = v.emp_id -- assuming you have some emp_id PK column
-- if necessary, you need to change the name of this column ofcourse
order by status_type_id;Do compare the resultsets, not sure this will give you the same/desired result, but it might give you an idea.
For example, I was thinking that the subquery should use actual tables instead of the view because > view is based on 10 tables and the subquery can instead
use two tables . Does it make sense?Sounds like worth a try to me, yes. Less data to plough through = faster response.
As well as using a function based index on UPPER(name) might be worth a try. -
Oracle query hints in JPQL - is it possible?
Sorry, posted to wrong forum... I don't know how to delete it - only edit...
Hello,
I am using Sun Java Application Server 9.1 (GlassFish), EJB 3.0 and JPA (TopLink). My database is Oracle.
Is there any way to specify Oracle query hints (for example, /*+ rule */ in JPQL queries? Or the only way to do it is using native queries?
Many thanks in advance
Edited by: Troff_2 on Nov 27, 2007 5:50 AMYes.It is possible.Only need to modify the view for order tracker query need to change.
You can use decode statement in the query to add status as Processing .
Please refer the IBE_ORDER_SUM_V view for details.
Eg:
decode(oel.meaning,'Booked',"Processing",oel.meaning) from
oe_lookups
oel, -
Tuning Oracle Integration Adapters for Performance
Hi,
I would like to know about tuning Oracle Applications adapter for performnace .
I got a document for performance tuning of BPEL PM. I am searching for similar kind of document which helps to fine tune the adapters for performance.
Please help me
Regards,
SundarHi,
Oracle JDeveloper 11g 11.1.2... doesn't include the SOA and WebCenter pieces - to use these components you'll need to download Oracle JDeveloper 11.1.1.6.0...
http://www.oracle.com/technetwork/developer-tools/jdev/downloads/jdeveloper11116-1377208.html
You will also need the Fusion Middleware Extensions for JDeveloper... Oracle SOA Composite Editor...
http://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/156082.xml
Hope this helps...
Cheers,
Vlad -
Converting MS SQL Server Query to Oracle Query
Hi There,
I've a strange problem. My project uses both MS SQL Server and Oracle server at run time. I've lot of queries which are written in MS SQL Style. Now, iam planning to write a helper class whic converts MS SQL Query to Oracle Query. Please Help me if any one has that kind of Helper with you.
Thanks And Regards,
Sasi KanthThat is why persistence applications like Hibernate or
CMP get used for apps that will use more than one DB,
but it takes upfront planning.
If you have a set of automated unit tests that work
with SQL Server, they will be a big help in getting
your Oracle code up and running.Indeed - JUnit and Ant would be a big help here.
It sounds like you have SQL in your JSPs, that will
work against you as well if so. If you are using a
DAO pattern, this will be much easier, as you can
re-implement each DAO for Oracle.If you'd layered this app properly, you might just implement an OracleDAOFactory and be done with it. Interfaces and a DAO layer would go a long way.
This is why layering is such a good idea. It isolates changes in a smaller subset of classes.
But your problem sounds pretty big. It'd be daunting even if it were well designed. -
Tuning Oracle APPS 11i Start with
Hi Hussain/Helios,
I am new to Oracle APPS, and am working oracle apps 11i 11.5.10.2 with 10.2.5.0, the database and application was upgraded by previous dba. which left almost 3-4 months before.
now my question is i want to have a performance tuning for Oracle apps environment, can you please suggest some key points for starting with and some good links for future usage.
Other thing is i have used find command on my linux box and found many log files which are greater than 1000K on apps tier (forms/reports/web), and similiarly db tier (db/admin/concurrent).
can i just remove all these logfiles using os (rm) command and is it feasible with production environment on running mode or is it not feasible and i should use some other ways/etc.
APPS Tier folder locations.
****podappl/admin/PROD/log
****prodora/iAS/Apache/Apache/logs/sec_audit.log
****prodora/iAS/Apache/Jserv/logs/mod_jserv.log
****prodora/iAS/Apache/Jserv/logs/jserv.log
****prodcomn/admin/scripts/PROD_****/sqlnet.log
****prodcomn/admin/log/PROD_****/
****prodcomn/_pages/
****prodcomn/rgf/PROD_****/
****prodcomn/rgf/PROD_****/oam/
DB Tier files folder locations.
****oracle/proddb/10.2.0/oc4j/j2ee/OC4J_DBConsole_*****_PROD/log/em-application.log
****oracle/proddb/10.2.0/oc4j/j2ee/OC4J_DBConsole_*****_PROD/log/http-web-access.log
****oracle/proddb/10.2.0/oc4j/j2ee/OC4J_DBConsole_****_PROD.upgrade/log/http-web-access.log
****oracle/proddb/10.2.0/appsutil/log/PROD_****/StageDBTier_10161830.log
****oracle/proddb/10.2.0/*****_PROD/sysman/log/emoms.log
****oracle/proddb/10.2.0/*****_PROD.upgrade/sysman/emd/sqlnet.log
****oracle/proddb/10.2.0/******_PROD.upgrade/sysman/log/
****oracle/prodappl/admin/PROD/log/For Performance Tuning, right now i have following points with me.
1). Compile APPS Schema in maintenace which i will take.
2). I have checked some Gather Stats/Purge jobs are already scheduled for maintenance.
Please tell me what other Jobs i can schedule using OAM for weekend for All tiers in APPS.
I have been also asked to apply latest patches on PROD APPS/DB/* system, I can check using sql, which patches are applied, but how can i know which patches are required, (don't know about the licensed products with never ask policy here).
Thanks,
RAJ
Edited by: 870344 on Jul 5, 2011 6:36 AMcan you please suggest some key points for starting with and some good links for future usage.Please check below MOS doc:-
A Holistic Approach to Performance Tuning Oracle Applications Systems [ID 69565.1]
Configuring various JVM tuning parameters for Oracle E-Business suite 11i and R12 [ID 567551.1]
Tuning is something that require more analysis less action, first you need to answer:-
1) Why do you need tuning? is it proactive or some incident happend?
2) Where are you facing issues? i.e. which module, form, report or whole application.
3) Number of users facing issues? i.e. is it single user, user at one location or all users.
4) Has something changed in past that might have triggered this need?
Theri are various components involved in tuning that start from :-
1) user machine
2) network
3) Application tier.
4) Database tier.
Application tier can be further divided into:-
1) Apache server(JVM, modplsql, jserv etc etc
2) Form Server
3) Concurrent processing server
4) Discovered if using,
5) XML publisher..
and like wise other component using.
If you are looking to tune then i believe start from application tier first, pick one by one componets, like if your users are facing issues with login then use note that i have provided, if users are not satisifed with time taken to complete concurrent request then you might have to tune it and likewise.
can i just remove all these logfiles using os (rm) command and is it feasible with production environment on running mode or is it not feasible and i should use some other ways/etc.Do not rm files because it might be in use by some process and ti might then not be able to release space, its better to trim the file. do cat file >
Log file you have mentioned can be removed depedning upon your company policy if any.
Thanks,
JD -
Some diffrence in oracle query and mysql query
sir i see both query in SessionBean1
mysql query
SELECT ALL usert.username,
usert.userid,
usert.camid FROM usert
this not use user name
oracle query
SELECT ALL MFA.LUSER.USERID,
MFA.LUSER.TITLE,
MFA.LUSER.CAMPID,
MFA.LUSER.PWD,
MFA.LUSER.USERNAME
FROM MFA.LUSER
the user name mfa is use in this query you can see
this is main diffrence
but i yse both in code but not get result
try {
RowKey userRowKey = luserDataProvider.findFirst
(new String[] { "MFA.LUSER.USERNAME" },
new Object[] { textField4.getText()});
if (userRowKey == null) {
textField3.setText("11111");
return null;
} else {
textField3.setText("22222");
return null;
catch (Exception e) {
log("Cannot perform login for userid " + textField3.getText(), e);
error("Cannot perform login for userid " + textField3.getText() + ": " + e);
textField3.setText("77777");
return null;
problem in only oracle not in mysql
please give me idea how i get result
thank youcan you post your query with explain plan for both 9i version and 10g version.
Thanks,
karthick. -
Is there try and catch in oracle query ?
hi
is there try and catch in oracle query ?
try
do some update
catch
if there was error go to here
}>
is there try and catch in oracle query ?
>
Yes - except it uses BEGIN --- EXCEPTION --- END where BEGIN replaces the try and EXCEPTION replaces the catch.
BEGIN
-- Calculation might cause division-by-zero error.
pe_ratio := stock_price / net_earnings;
dbms_output.put_line('Price/earnings ratio = ' || pe_ratio);
EXCEPTION -- exception handlers begin
-- Only one of the WHEN blocks is executed.
WHEN ZERO_DIVIDE THEN -- handles 'division by zero' error
dbms_output.put_line('Company must have had zero earnings.');
pe_ratio := null;
WHEN OTHERS THEN -- handles all other errors
dbms_output.put_line('Some other kind of error occurred.');
pe_ratio := null;
END; -- exception handlers and block end here
/The multiple WHEN conditions correspond to using multiple 'catch' statements in Java.
Maybe you are looking for
-
For the past week or so i have no access to my email address (@btinternet.com) I am in afgahnistan at the momemnt so got no access to calling the premium mail helpline. I have tried the live assistance chat, but they just seem unable to solve my pro
-
Adobe Air Application Installer.exe Documentation
Hello All, i am having severe problems retrieving the documentation for "Adobe Air Application Installer.exe" We have applied as Publisher for Air Apps here: http://www.adobe.com/products/air/runtime_distribution1.html and filled out the form http://
-
Displays Correctly In Chrome But Issues With Internet Explorer
Hi - My site is up at tkpf.info. The banner slider works fine on Chrome, not so much on IE. Any ideas why it's so messed up on IE? I tried playing with different versions of java script but that doesn't seem to make any difference. It also seems
-
IPhone 5 will not sync with iCal
iphone 5 will not sync with ical using 10.7.5 please help
-
Where best to check conditions, main loop?
Ok, with a little tinkering, I now have a nearly functional app. As I put pieces up on the board, I keep count. When I remove a piece from the board, I decrement my count, and the level is complete when the count reaches 0. So, where is the best plac