Long running statement
Hi,
Is there any way to find out the long running statement from the previous night batch program?
Thanks
Another method is by using OEM.
1) Click on the performance tab, switch to historical selection from the drop down View Data on top right corner.
2) Scroll down to Additional Monitoring Links and select Period SQL. Use the selector at bottom of top graph to the spike in activity. Again the heavy SQL will show.
3) Click the SQL in question by examining CPU and elapsed times. Use the plan hash value to select from v$sql or v$sqltext if required. Check the SQL plan and tuning information if available.
4) From 2 above you an also schedule SQL Tuning or SQL Access advisor.
Similar Messages
-
On JDBC statement, there is the method 'cancel' to instruct the database to cancel an executing statement. This works fine on Oracle server database, but not on Oracle lite database. The method call 'cancel' just blocks and the running statement is never interrupted.
The example I tried is very simple. There is a thread started which executes a long running statement. I noticed, that when moving the cursor forward by calling rs.next(), it just blocks. That would be ok, if the statement could be canceled from within the main thread by stmt.cancel. But this call blocks as well with no implact on the running statement. Why is that? Do I miss something or is it not possible to cancel a long running statements in Oracle Lite?
In the following my code snipped:
public class CancelStatement {
private static final String PATH_DB = "XX";
private static final String PATH_LIB = "XX";
private static final String CON_STRING = "jdbc:polite:whatever;DataDirectory=" + PATH_DB + ";Database=XX;IsolationLevel=Read Committed;Autocommit=Off;CursorType=Forward Only";
private static final String USER = "XX";
private static final String PASSWORD = "XX";
public static void main(String args[]) throws Exception {
System.setProperty("java.library.path", PATH_LIB);
Class.forName("oracle.lite.poljdbc.POLJDBCDriver");
Connection con = DriverManager.getConnection(CON_STRING, USER, PASSWORD);
Statement stmt = con.createStatement();
Thread thread = new Thread(new LongStatementRunnable(con, stmt));
thread.start();
Thread.sleep(3000);
// stop long running statement
System.out.println("cancel long running statement");
stmt.cancel(); // XXX does not work, as call is blocked until out of memory
System.out.println("statement canceled");
private static class LongStatementRunnable implements Runnable {
private Connection con;
private Statement stmt;
public LongStatementRunnable(Connection con, Statement stmt) {
this.con = con;
this.stmt = stmt;
@Override
public void run() {
try {
System.out.println("start long running statement...");
// execute long running statement
ResultSet rs = stmt.executeQuery("SELECT * FROM PERSON P1, PERSON P2");
while (rs.next()) { // here the execution gets blocked
System.out.println("row"); // is never entered
rs.close();
stmt.close();
con.close();
System.out.println("long running statement finished...");
} catch (Exception e) {
e.printStackTrace();
}I would be very glad if you could help me.
Thanks a lot
Daniel
Edited by: 861793 on 26.05.2011 14:29Unfortunately Oracle Lite doesn't have this option. You can call your statement from a second thread as you have done, but you won't be able to kill or cancel this operation. The only way to get fix this is by rebooting. You can use process explorer to find the dll process that is executing the SQL, but the tables will be locked and sync would be locked as well until the process is finished running in shared memory.
-
Long running statement including function
Hello expert,
I have a long running statement and corresponding function as follows:
select
pp.policy_premium_pk,
pp.policy_fk,
pp.policy_term_fk,
pp.risk_fk,
pp.coverage_fk,
pp.transaction_log_fk,
pp.coverage_component_code,
hiroc_rpt_user.hiroc_get_delta_amount(pp.policy_fk, pp.policy_term_fk, pp.risk_fk, pp.coverage_fk, pp.transaction_log_fk, pp.coverage_component_code),
pp.rate_period_from_date
from proddw_mart.rmv_policy_premium pp
where pp.rate_period_type_code = 'TERM_COVG'
and pp.coverage_component_code <> 'NETPREM'
-- and pp.premium_amount <> 0
-- *** Following line is included for faster performance
and hiroc_rpt_user.hiroc_get_delta_amount(pp.policy_fk, pp.policy_term_fk, pp.risk_fk, pp.coverage_fk, pp.transaction_log_fk, pp.coverage_component_code) != 0
group by pp.policy_premium_pk,
pp.policy_premium_pk,
pp.policy_fk,
pp.policy_term_fk,
pp.risk_fk,
pp.coverage_fk,
pp.transaction_log_fk,
pp.coverage_component_code,
pp.rate_period_from_date;
CREATE OR REPLACE FUNCTION HIROC_RPT_USER."HIROC_GET_DELTA_AMOUNT" (
p_policy_fk IN NUMBER,
p_policy_term_history_fk IN NUMBER,
p_risk_fk IN NUMBER,
p_coverage_fk IN NUMBER,
p_transaction_log_fk IN NUMBER,
p_comp_code IN VARCHAR2)
RETURN NUMBER
IS
v_prev_trlog_fk NUMBER;
v_delta NUMBER;
v_parm VARCHAR2(1000);
v_msg VARCHAR2(200);
comma VARCHAR2(1) := ',';
v_src VARCHAR2(100) := 'Get_Delta_Amount';
BEGIN
SELECT nvl(MAX(pp.transaction_log_fk), -1)
INTO v_prev_trlog_fk
FROM proddw_mart.rmv_Policy_Premium pp
WHERE pp.coverage_fk = p_coverage_fk
AND pp.policy_term_fk = p_policy_term_history_fk
AND pp.transaction_log_fk+0 < p_transaction_log_fk
AND pp.coverage_component_code = p_comp_code
AND pp.rate_period_type_code = 'TERM_COVG';
SELECT nvl(SUM(decode(pp.transaction_log_fk, p_transaction_log_fk, premium_amount, 0)), 0) -
nvl(SUM(decode(pp.transaction_log_fk, p_transaction_log_fk, 0, pp.premium_amount)), 0)
INTO v_delta
FROM proddw_mart.rmv_Policy_Premium pp
WHERE pp.coverage_fk = p_coverage_fk
AND pp.policy_term_fk = p_policy_term_history_fk
AND pp.transaction_log_fk+0 IN (p_transaction_log_fk, v_prev_trlog_fk)
AND pp.rate_period_type_code = 'TERM_COVG'
AND INSTR(p_comp_code, pp.coverage_component_code) > 0;
RETURN v_delta;
EXCEPTION
WHEN NO_DATA_FOUND THEN
return 0;
WHEN OTHERS THEN
return 0;
END;
and it execution plan is as follows:
PLAN_TABLE_OUTPUT
Plan hash value: 319541564
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 92525 | 5511K| | 17417 (4)| 00:03:30 |
| 1 | HASH GROUP BY | | 92525 | 5511K| 14M| 17417 (4)| 00:03:30 |
|* 2 | MAT_VIEW ACCESS FULL| RMV_POLICY_PREMIUM | 92525 | 5511K| | 16045 (4)| 00:03:13 |
Predicate Information (identified by operation id):
2 - filter("PP"."RATE_PERIOD_TYPE_CODE"='TERM_COVG' AND
"PP"."COVERAGE_COMPONENT_CODE"<>'NETPREM' AND
"HIROC_RPT_USER"."HIROC_GET_DELTA_AMOUNT"("PP"."POLICY_FK","PP"."POLICY_TERM_FK","PP"."RISK_
FK","PP"."COVERAGE_FK","PP"."TRANSACTION_LOG_FK","PP"."COVERAGE_COMPONENT_CODE")<>0)As the first (warming up) step you could rewrite your function to do it's task with a single select
CREATE OR REPLACE FUNCTION
HIROC_RPT_USER."HIROC_GET_DELTA_AMOUNT" (p_policy_fk IN NUMBER, /* not used */
p_policy_term_history_fk IN NUMBER,
p_risk_fk IN NUMBER, /* not used */
p_coverage_fk IN NUMBER,
p_transaction_log_fk IN NUMBER,
p_comp_code IN VARCHAR2
RETURN NUMBER
IS
v_prev_trlog_fk NUMBER;
v_delta NUMBER;
BEGIN
SELECT nvl(MAX(pp.transaction_log_fk), -1)
INTO v_prev_trlog_fk
FROM proddw_mart.rmv_Policy_Premium pp
WHERE pp.coverage_fk = p_coverage_fk
AND pp.policy_term_fk = p_policy_term_history_fk
AND pp.transaction_log_fk+0 < p_transaction_log_fk
AND pp.coverage_component_code = p_comp_code
AND pp.rate_period_type_code = 'TERM_COVG';
SELECT nvl(SUM(decode(pp.transaction_log_fk, p_transaction_log_fk, premium_amount, 0)), 0) -
nvl(SUM(decode(pp.transaction_log_fk, p_transaction_log_fk, 0, pp.premium_amount)), 0)
INTO v_delta
FROM proddw_mart.rmv_Policy_Premium pp
WHERE pp.coverage_fk = p_coverage_fk
AND pp.policy_term_fk = p_policy_term_history_fk
AND pp.transaction_log_fk+0 IN (p_transaction_log_fk, v_prev_trlog_fk)
AND pp.rate_period_type_code = 'TERM_COVG'
AND INSTR(p_comp_code, pp.coverage_component_code) > 0;
select nvl(sum(case transaction_log_fk when p_transaction_log_fk
then premium_amount
else -premium_amount
end
0
into v_delta
from proddw_mart.rmv_Policy_Premium
where coverage_fk = p_coverage_fk
and policy_term_fk = p_policy_term_history_fk
and instr(p_comp_code,coverage_component_code) > 0
and rate_period_type_code = 'TERM_COVG'
and transaction_log_fk in (select p_transaction_log_fk,nvl(max(transaction_log_fk),-1)
from proddw_mart.rmv_Policy_Premium
where coverage_fk = p_coverage_fk
and policy_term_fk = p_policy_term_history_fk
and transaction_log_fk < p_transaction_log_fk
and coverage_component_code = p_comp_code
and rate_period_type_code = 'TERM_COVG'
RETURN v_delta;
EXCEPTION
WHEN NO_DATA_FOUND THEN return 0;
WHEN OTHERS THEN return 0;
END;in the next step you could get rid of the function call:
something along the lines of
select pp.policy_premium_pk,
pp.policy_fk,
pp.policy_term_fk,
pp.risk_fk,
pp.coverage_fk,
pp.transaction_log_fk,
pp.coverage_component_code,
nvl(sum(case f.transaction_log_fk when pp.transaction_log_fk
then f.premium_amount
else -f.premium_amount
end
0
) premium_amount,
pp.rate_period_from_date
from proddw_mart.rmv_policy_premium pp,
(select p.premium_amount,
p.policy_term_fk,
p.coverage_fk,
p.transaction_log_fk,
p.coverage_component_code
from proddw_mart.rmv_Policy_Premium p
where p.rate_period_type_code = 'TERM_COVG'
and instr('NETPREM',coverage_component_code) > 0
) f
where pp.rate_period_type_code = 'TERM_COVG'
and pp.coverage_component_code = 'NETPREM'
and pp.policy_term_fk = f.policy_term_fk
and pp.coverage_fk = f.coverage_fk
and (
pp.transaction_log_fk = f.transaction_log_fk
or
pp.transaction_log_fk = (select nvl(max(transaction_log_fk),-1)
from proddw_mart.rmv_Policy_Premium
where rate_period_type_code = 'TERM_COVG'
and coverage_component_code = 'NETPREM'
and policy_term_fk = pp.policy_term_fk
and coverage_fk = pp.coverage_fk
and transaction_log_fk < pp.transaction_log_fk
group by pp.policy_premium_pk,
pp.policy_premium_pk,
pp.policy_fk,
pp.policy_term_fk,
pp.risk_fk,
pp.coverage_fk,
pp.transaction_log_fk,
pp.coverage_component_code,
pp.rate_period_from_dateRegards
Etbin -
How to analysis long time running statement
Hi expert,
please check following statement, it ran for a long time recent days, will you please instruct how to do analysis to find out the root cause for its long running. in it, function hiroc_get_delta_amount and large table rmv_policy_premium have caused this long runing time, but I still want to get more fault information from system side.
select
pp.policy_premium_pk,
pp.policy_fk,
pp.policy_term_fk,
pp.risk_fk,
pp.coverage_fk,
pp.transaction_log_fk,
pp.coverage_component_code,
hiroc_rpt_user.hiroc_get_delta_amount(pp.policy_fk, pp.policy_term_fk, pp.risk_fk, pp.coverage_fk, pp.transaction_log_fk, pp.coverage_component_code),
pp.rate_period_from_date
from proddw_mart.rmv_policy_premium pp
where pp.rate_period_type_code = 'TERM_COVG'
and pp.coverage_component_code <> 'NETPREM'
-- and pp.premium_amount <> 0
-- *** Following line is included for faster performance
and hiroc_rpt_user.hiroc_get_delta_amount(pp.policy_fk, pp.policy_term_fk, pp.risk_fk, pp.coverage_fk, pp.transaction_log_fk, pp.coverage_component_code) != 0
group by pp.policy_premium_pk,
pp.policy_premium_pk,
pp.policy_fk,
pp.policy_term_fk,
pp.risk_fk,
pp.coverage_fk,
pp.transaction_log_fk,
pp.coverage_component_code,
pp.rate_period_from_date
Many Thanks,843178 wrote:
-- *** Following line is included for faster performance
and hiroc_rpt_user.hiroc_get_delta_amount(pp.policy_fk, pp.policy_term_fk, pp.risk_fk, pp.coverage_fk, pp.transaction_log_fk, pp.coverage_component_code) != 0 That's an intersting piece of code.
Apparently, by adding a user defined function into a query, that's going to improve performance according to the comment.
In truth, it's going to add context switching and slow the query down.
As well as posting the information required (as detailed by the FAQ posts), you will also need to ensure you provide detials of what that function does. If the functionality can be done in SQL rather than a PL/SQL function, then that will certainly improve things. -
Long running select statement and v$session_longops
Oracle Version: 10.2.0.4
I've a long running sql query that takes the estimated 6 minutes to complete and return the result.
While it's running I'd like to observe it into the view v$session_longops.
I altered the session that runs the query with
ALTER SESSION SET timed_statistics=TRUE;The tables it queries have gathered statistics on them.
However I don't see any rows in the view v$session_longops for the respective SID and serial#. Why is that? What am I missing?
Thank you!Hi,
Now I understand what you all meant by "loops" here .. Yes, the query does nested loops as one can see from the execution plan. So it could be the reason
SELECT STATEMENT, GOAL = ALL_ROWS
SORT GROUP BY
CONCATENATION
TABLE ACCESS BY LOCAL INDEX ROWID TABLE_1
NESTED LOOPS
NESTED LOOPS
TABLE ACCESS BY GLOBAL INDEX ROWID TABLE_2
INDEX RANGE SCAN IPK_t2_CDATE
TABLE ACCESS BY INDEX ROWID TABLE_3
INDEX RANGE SCAN IPK_T3
PARTITION RANGE ALL
INDEX RANGE SCAN IRGP_REGCODE
TABLE ACCESS BY LOCAL INDEX ROWID TABLE_1
NESTED LOOPS
NESTED LOOPS
TABLE ACCESS BY GLOBAL INDEX ROWID TABLE_2
INDEX RANGE SCAN IPK_t2_STATUS
TABLE ACCESS BY INDEX ROWID TABLE_3
INDEX RANGE SCAN IPK_T3
PARTITION RANGE SINGLE
INDEX RANGE SCAN IRGP_REGCODE -
Long running reports end successfully - present s "page can not be found"
Long running reports and browser timeouts - page can not be found"
We are launching Oracle 9i Reports from a Portal 9ias (release 9.0.2.2) system. We are in production with about 100 users. It is not going well with respect to Report problems.
We have the following problems:
1) hanging reports,
2) reports where parameter screens will not present due to large LOV on parameter screen,
3) and the most aggravating problem is "Page can not be found" presented to user when in fact the report ran successfully and create a .pdf.
We are at our wits end with Oracle Support and the Oracle Portal and Reports product.
As I said, I am launching Oracle Reports 9i from a Portal 9.0.2.2 application. I have several long running reports that complete successfully but return to the user an error "Page can not be found". Meta-link Note: 189454.1 suggests a modification to ReceiveTimeout parameter in the pc registry. We set the ReceiveTimeout parameter to 7200000. This did not solve the problem. Users still receive "Page can not be found".
Is there a report server side setting that we must set also ... or some other setting we should check?
I need to solve this issue. Is there someone out there that can help? Are there other people having similar Oracle Reports issues? According to Oracle Support we are the only people with these issues. Are we?1) If you can reproduce the Reports Hanging issue consistently you can push Oracle Support to file a bug.
2) I am not sure about this now, but again you can take this to Oracle Support and push for resolution.
3) There are some problems with IE - Adobe integration. This is not a Reports bug. You can try
(a) Switching off Adobe - web integration in Adobe Acrobat reader settings, so that Adobe will not automatically open pdf file in web. Instead a dialog will be shown as to which application to open the pdf file or save it to disk and user can save the file to disk and open.
(b) Use IE latest version. (or some other browser like Netscape )
[ You can roll back the ReceiveTimeout param change you made to see the impacts one at a time ]
1) To confirm that this is a Adobe - IE pdf problem run the same report to htmlcss, rtf. If these come fine, then we can ascertain that this is Adobe - IE issue.
2) Give http://host:port/reports/rwservlet/showjobs?server=server_name. You can see all the jobs and their jobids. For the concerned jobs you can click and see whether output is actually generated or not.
Thanks
The Oracle Reports Team
The statements and opinions expressed here are my own and not that of my employer -
Long running query--- included steps given by Randolf
Hi,
I have done my best to follow Randolf instruction word-by-word and hope to get solution for my
problem soon. Sometime back I have posted a thread on this problem then got busy with other
stuff and was not able to follow it. Here I am again with same issue.
here is link for my previous post
long running query in database 10gHere is backgroud of my requriemment.
I am working on Oracle forms 10g which is using package given below. We want to display client information
with order count basd on different status like Pending, Error, back Order, expedited, std shipping.
Output will look something like.
client name pending error backorder expedited std shipping
ABC 24 0 674 6789 78900
XYZ 35 673 5700 0 798274
.There are total 40 clients . The long running query are expedited and std shipping.
When i run package from Oracle Form Developer it takes 3 mintues to run but when I run same query in our application using forms
(which uses Oracle Application Server) it takes around 1 hour, which is completly unacceptable.
User wants it be done in less than 1 mintue.
I have tried combining Pending,error and backorder queries together but as far as I know it will not
work in Oracle Form as we need a place holder for each status.
Please dont think it is Forms related question, it is a Performance problem.
PACKAGE BODY ORDER_COUNT_PKG IS
PROCEDURE post_query IS
BEGIN
BEGIN
SELECT count(*)
INTO :ORDER_STATUS.PENDING
FROM orders o
WHERE o.status = 'P'
AND (parent_order_id is null
OR (order_type='G'
AND parent_order_id=original_order_number))
AND o.client = :ORDER_STATUS.CLIENT_NUMBER;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
BEGIN
SELECT count(*)
INTO :ORDER_STATUS.ERROR
FROM orders o
WHERE o.status = 'E'
AND (parent_order_id is null
OR (order_type='G'
AND parent_order_id=original_order_number))
AND o.client = :ORDER_STATUS.CLIENT_NUMBER;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
BEGIN
SELECT count(*)
INTO :ORDER_STATUS.BACK_ORDER
FROM orders o
WHERE o.status = 'B'
AND (parent_order_id is null
OR (order_type='G'
AND parent_order_id=original_order_number))
AND o.client = :ORDER_STATUS.CLIENT_NUMBER;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
BEGIN
SELECT count(*)
INTO :ORDER_STATUS.EXPEDITE
FROM orders o,shipment_type_methods stm
WHERE o.status in ('A','U')
AND (o.parent_order_id is null
OR (o.order_type = 'G'
AND o.parent_order_id = o.original_order_number))
AND o.client = stm.client
AND o.shipment_class_code = stm.shipment_class_code
AND (nvl(o.priority,'1') = '2'
OR stm.surcharge_amount <> 0)
AND o.client = :ORDER_STATUS.CLIENT_NUMBER
GROUP BY o.client;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
BEGIN
SELECT count(*)
INTO :ORDER_STATUS.STD_SHIP
FROM orders o,shipment_type_methods stm
WHERE o.status in ('A','U')
AND (o.parent_order_id is null
OR (o.order_type = 'G'
AND o.parent_order_id = o.original_order_number))
AND nvl(o.priority,'1') <> '2'
AND o.client = stm.client
AND o.shipment_class_code = stm.shipment_class_code
AND stm.surcharge_amount = 0
AND o.client = :ORDER_STATUS.CLIENT_NUMBER
GROUP BY o.client;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
END post_query;
END ORDER_COUNT_PKG;one of the query which is taking long time is
SELECT count(*)
FROM orders o,shipment_type_methods stm
WHERE o.status in ('A','U')
AND (o.parent_order_id is null
OR (o.order_type = 'G'
AND o.parent_order_id = o.original_order_number))
AND nvl(o.priority,'1') <> '2'
AND o.client = stm.client
AND o.shipment_class_code = stm.shipment_class_code
AND stm.surcharge_amount = 0
AND o.client = :CLIENT_NUMBER
GROUP BY o.clientThe version of the database is 10.2.1.0.2
SQL> alter session force parallel dml;These are the parameters relevant to the optimizer:
SQL> show parameter user_dump_dest
NAME TYPE VALUE
user_dump_dest string /u01/app/oracle/admin/mcgemqa/
udump
SQL> show parameter optimizer
NAME TYPE VALUE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 10.2.0.4
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
SQL> show parameter db_file_multi
NAME TYPE VALUE
db_file_multiblock_read_count integer 16
SQL> show parameter db_block_size
NAME TYPE VALUE
db_block_size integer 8192
SQL> show parameter cursor_sharing
NAME TYPE VALUE
cursor_sharing string EXACTHere is the output of EXPLAIN PLAN:
SQL> explain plan for
2 SELECT count(*)
3 FROM orders o,shipment_type_methods stm
4 WHERE o.status in ('A','U')
5 AND (o.parent_order_id is null
6 OR (o.order_type = 'G'
7 AND o.parent_order_id = o.original_order_number))
8 AND nvl(o.priority,'1') <> '2'
9 AND o.client = stm.client
10 AND o.shipment_class_code = stm.shipment_class_code
11 AND stm.surcharge_amount = 0
12 AND o.client = :CLIENT_NUMBER
13 GROUP BY o.client
14 /
Explained.
Elapsed: 00:00:00.12
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 559278019
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 35 | 46764 (3)| 00:09:22 |
| 1 | SORT GROUP BY NOSORT | | 1 | 35 | 46764 (3)| 00:09:22 |
|* 2 | TABLE ACCESS BY INDEX ROWID | ORDERS | 175K| 3431K| 25979 (3)| 00:05:12 |
| 3 | NESTED LOOPS | | 25300 | 864K| 46764 (3)| 00:09:22 |
|* 4 | TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS | 1 | 15 | 2 (0)| 00:00
|* 5 | INDEX RANGE SCAN | U_SHIPMENT_TYPE_METHODS | 2 | | 1 (0)| 00:00:01 |
|* 6 | INDEX RANGE SCAN | ORDERS_ORDER_DATE | 176K| | 2371 (8)| 00:00:29 |
Predicate Information (identified by operation id):
2 - filter(("O"."PARENT_ORDER_ID" IS NULL OR "O"."ORDER_TYPE"='G' AND
"O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER")) AND NVL("O"."PRIORITY",'1')<>'2
AND "O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_CODE")
4 - filter("STM"."SURCHARGE_AMOUNT"=0)
5 - access("STM"."CLIENT"=:CLIENT_NUMBER)
6 - access("O"."CLIENT"=:CLIENT_NUMBER)
filter("O"."STATUS"='A' OR "O"."STATUS"='U')
24 rows selected.
Elapsed: 00:00:00.86
SQL> rollback;
Rollback complete.
Elapsed: 00:00:00.07Here is the output of SQL*Plus AUTOTRACE including the TIMING information:
SQL> SELECT count(*)
2 FROM orders o,shipment_type_methods stm
3 WHERE o.status in ('A','U')
4 AND (o.parent_order_id is null
5 OR (o.order_type = 'G'
6 AND o.parent_order_id = o.original_order_number))
7 AND nvl(o.priority,'1') <> '2'
8 AND o.client = stm.client
9 AND o.shipment_class_code = stm.shipment_class_code
10 AND stm.surcharge_amount = 0
11 AND o.client = :CLIENT_NUMBER
12 GROUP BY o.client
13 /
Elapsed: 00:00:03.09
Execution Plan
Plan hash value: 559278019
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 35 | 46764 (3)| 00:09:22 |
| 1 | SORT GROUP BY NOSORT | | 1 | 35 | 46764 (3)| 00:09:22 |
|* 2 | TABLE ACCESS BY INDEX ROWID | ORDERS | 175K| 3431K| 25979 (3)| 00:05:12 |
| 3 | NESTED LOOPS | | 25300 | 864K| 46764 (3)| 00:09:22 |
|* 4 | TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS | 1 | 15 | 2 (0)| 00:00
|* 5 | INDEX RANGE SCAN | U_SHIPMENT_TYPE_METHODS | 2 | | 1 (0)| 00:00:01 |
|* 6 | INDEX RANGE SCAN | ORDERS_ORDER_DATE | 176K| | 2371 (8)| 00:00:29 |
Predicate Information (identified by operation id):
2 - filter(("O"."PARENT_ORDER_ID" IS NULL OR "O"."ORDER_TYPE"='G' AND
"O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER")) AND NVL("O"."PRIORITY",'1')<>'2
AND "O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_CODE")
4 - filter("STM"."SURCHARGE_AMOUNT"=0)
5 - access("STM"."CLIENT"=:CLIENT_NUMBER)
6 - access("O"."CLIENT"=:CLIENT_NUMBER)
filter("O"."STATUS"='A' OR "O"."STATUS"='U')
Statistics
55 recursive calls
0 db block gets
7045 consistent gets
0 physical reads
0 redo size
206 bytes sent via SQL*Net to client
238 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
SQL> disconnect
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> The TKPROF output for this statement looks like the following:
SELECT count(*)
FROM orders o,shipment_type_methods stm
WHERE o.status in ('A','U')
AND (o.parent_order_id is null
OR (o.order_type = 'G'
AND o.parent_order_id = o.original_order_number))
AND nvl(o.priority,'1') <> '2'
AND o.client = stm.client
AND o.shipment_class_code = stm.shipment_class_code
AND stm.surcharge_amount = 0
AND o.client = :CLIENT_NUMBER
GROUP BY o.client
call count cpu elapsed disk query current rows
Parse 1 0.01 0.00 0 0 0 0
Execute 1 0.04 0.04 0 0 0 0
Fetch 2 2.96 2.91 0 7039 0 1
total 4 3.01 2.95 0 7039 0 1
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 95
Rows Row Source Operation
1 SORT GROUP BY NOSORT (cr=7039 pr=0 pw=0 time=2913701 us)
91 TABLE ACCESS BY INDEX ROWID ORDERS (cr=7039 pr=0 pw=0 time=261997906 us)
93 NESTED LOOPS (cr=6976 pr=0 pw=0 time=20740 us)
1 TABLE ACCESS BY INDEX ROWID SHIPMENT_TYPE_METHODS (cr=2 pr=0 pw=0 time=208 us)
3 INDEX RANGE SCAN U_SHIPMENT_TYPE_METHODS (cr=1 pr=0 pw=0 time=88 us)(object id 81957)
91 INDEX RANGE SCAN ORDERS_ORDER_DATE (cr=6974 pr=0 pw=0 time=70 us)(object id 81547)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
SQL*Net message from client 2 0.02 0.02
********************************************************************************The DBMS_XPLAN.DISPLAY_CURSOR output:
SQL> variable CLIENT_NUMBER varchar2(20)
SQL> exec :CLIENT_NUMBER := '14'
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.06
SQL> SELECT /*+ gather_plan_statistics */ count(*)
2 FROM orders o,shipment_type_methods stm
3 WHERE o.status in ('A','U')
4 AND (o.parent_order_id is null
5 OR (o.order_type = 'G'
6 AND o.parent_order_id = o.original_order_number))
7 AND nvl(o.priority,'1') <> '2'
8 AND o.client = stm.client
9 AND o.shipment_class_code = stm.shipment_class_code
10 AND stm.surcharge_amount = 0
11 AND o.client = :CLIENT_NUMBER
12 GROUP BY o.client
13 /
COUNT(*)
91
Elapsed: 00:00:02.85
SQL> set termout on
SQL> select * from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST'));
PLAN_TABLE_OUTPUT
SQL_ID 4nfj368y8w6a3, child number 0
SELECT /*+ gather_plan_statistics */ count(*) FROM orders o,shipment_type_methods stm WHERE
o.status in ('A','U') AND (o.parent_order_id is null OR (o.order_type = 'G'
AND o.parent_order_id = o.original_order_number)) AND nvl(o.priority,'1') <> '2' AND
o.client = stm.client AND o.shipment_class_code = stm.shipment_class_code AND
stm.surcharge_amount = 0 AND o.client = :CLIENT_NUMBER GROUP BY o.client
Plan hash value: 559278019
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers |
| 1 | SORT GROUP BY NOSORT | | 1 | 1 | 1 |00:00:02.63 | 7039 |
|* 2 | TABLE ACCESS BY INDEX ROWID | ORDERS | 1 | 175K| 91 |00:03:56.87 | 7039 |
| 3 | NESTED LOOPS | | 1 | 25300 | 93 |00:00:00.02 | 6976 |
|* 4 | TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS | 1 | 1 | 1 |00:00:00.01 | 2 |
|* 5 | INDEX RANGE SCAN | U_SHIPMENT_TYPE_METHODS | 1 | 2 | 3 |00:00:00.01 | 1 |
|* 6 | INDEX RANGE SCAN | ORDERS_ORDER_DATE | 1 | 176K| 91 |00:00:00.01 | 6974 |
Predicate Information (identified by operation id):
2 - filter((("O"."PARENT_ORDER_ID" IS NULL OR ("O"."ORDER_TYPE"='G' AND
"O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER"))) AND NVL("O"."PRIORITY",'1')<>'
"O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_CODE"))
4 - filter("STM"."SURCHARGE_AMOUNT"=0)
5 - access("STM"."CLIENT"=:CLIENT_NUMBER)
6 - access("O"."CLIENT"=:CLIENT_NUMBER)
filter(("O"."STATUS"='A' OR "O"."STATUS"='U'))
32 rows selected.
Elapsed: 00:00:01.30
SQL> I'm looking forward for suggestions how to improve the performance of this statement.
Thanks
SandyPlease find explain plan for No hint
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 559278019
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 35 | 46764 (3)| 00:09:22 |
| 1 | SORT GROUP BY NOSORT | | 1 | 35 | 46764 (3)| 00:09:22 |
|* 2 | TABLE ACCESS BY INDEX ROWID | ORDERS | 175K| 3431K| 25979 (3)| 00:05:12 |
| 3 | NESTED LOOPS | | 25300 | 864K| 46764 (3)| 00:09:22 |
|* 4 | TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS | 1 | 15 | 2 (0)| 00:00
|* 5 | INDEX RANGE SCAN | U_SHIPMENT_TYPE_METHODS | 2 | | 1 (0)| 00:00:01 |
|* 6 | INDEX RANGE SCAN | ORDERS_ORDER_DATE | 176K| | 2371 (8)| 00:00:29 |
Predicate Information (identified by operation id):
2 - filter(("O"."PARENT_ORDER_ID" IS NULL OR "O"."ORDER_TYPE"='G' AND
"O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER")) AND NVL("O"."PRIORITY",'1')<>'2
AND "O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_CODE")
4 - filter("STM"."SURCHARGE_AMOUNT"=0)
5 - access("STM"."CLIENT"=:CLIENT_NUMBER)
6 - access("O"."CLIENT"=:CLIENT_NUMBER)
filter("O"."STATUS"='A' OR "O"."STATUS"='U')
24 rows selected.
Elapsed: 00:00:00.86Explain Plan for Parallel Hint
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 559278019
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 35 | 46764 (3)| 00:09:22 |
| 1 | SORT GROUP BY NOSORT | | 1 | 35 | 46764 (3)| 00:09:22 |
|* 2 | TABLE ACCESS BY INDEX ROWID | ORDERS | 175K| 3431K| 25979 (3)| 00:05:12 |
| 3 | NESTED LOOPS | | 25300 | 864K| 46764 (3)| 00:09:22 |
|* 4 | TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS | 1 | 15 | 2 (0)| 00:00
|* 5 | INDEX RANGE SCAN | U_SHIPMENT_TYPE_METHODS | 2 | | 1 (0)| 00:00:01 |
|* 6 | INDEX RANGE SCAN | ORDERS_ORDER_DATE | 176K| | 2371 (8)| 00:00:29 |
Predicate Information (identified by operation id):
2 - filter(("O"."PARENT_ORDER_ID" IS NULL OR "O"."ORDER_TYPE"='G' AND
"O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER")) AND NVL("O"."PRIORITY",'1')<>'2
AND "O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_CODE")
4 - filter("STM"."SURCHARGE_AMOUNT"=0)
5 - access("STM"."CLIENT"='14')
6 - access("O"."CLIENT"='14')
filter("O"."STATUS"='A' OR "O"."STATUS"='U')
24 rows selected.
Elapsed: 00:00:08.92Explain Plan for USE_Hash hint
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 1465232248
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 35 | 46786 (3)| 00:09:22 |
| 1 | SORT GROUP BY NOSORT | | 1 | 35 | 46786 (3)| 00:09:22 |
|* 2 | HASH JOIN | | 25300 | 864K| 46786 (3)| 00:09:22 |
|* 3 | TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS | 1 | 15 | 2 (0)| 00:00:0
|* 4 | INDEX RANGE SCAN | U_SHIPMENT_TYPE_METHODS | 2 | | 1 (0)| 00:00:01 |
|* 5 | TABLE ACCESS BY INDEX ROWID| ORDERS | 175K| 3431K| 46763 (3)| 00:09:22 |
|* 6 | INDEX RANGE SCAN | ORDERS_ORDER_DATE | 176K| | 4268 (8)| 00:00:52 |
Predicate Information (identified by operation id):
2 - access("O"."CLIENT"="STM"."CLIENT" AND "O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_COD
E")
3 - filter("STM"."SURCHARGE_AMOUNT"=0)
4 - access("STM"."CLIENT"='14')
5 - filter(("O"."PARENT_ORDER_ID" IS NULL OR "O"."ORDER_TYPE"='G' AND
"O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER")) AND NVL("O"."PRIORITY",'1')<>'2
6 - access("O"."CLIENT"='14')
filter("O"."STATUS"='A' OR "O"."STATUS"='U')
25 rows selected.
Elapsed: 00:00:01.09
SQL> Thanks
Sandy -
ORABPEL-05002 for long running process
Hi everybody,
My question is related with a long running process I have designed and which, after running for a couple of days, ends by reporting the ORABPEL-05002 error:
===============================================================
ORABPEL-05002
Message handle error.
An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.PerformMessage"; the exception is: Transaction was rolled back: timed out; nested exception is: java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
java.lang.Exception: No Exception - originate from:
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:152)
at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
===============================================================
Looking in the Manual Recovery screen, I can see an Activity I can recover. It's about an assign Activity where I'm doing a single boolean assignation.
Of course, together with the ORABPEL-05002 error I got also the 'Transaction was rolled back: time out' message. Note that I have modified the transaction-timeout value to 180000. The error occurs during the night, with no heavy load of the server.
Recovering the assign activity brings back the process in the running state.
My process pattern:
while (1 == 1) {
do activity;
wait_timeout();
So, I have the following questions:
1. Which is cause of this error?
2. How may I automatically recover this lost activity? RecoveryAgent?
Any suggestion is appreciated.
Regards,
amo
P.S: the full stack of error messages reported in domain.log:
===============================================================
<2006-09-18 08:08:34,101> <ERROR> <SRH.collaxa.cube.engine.dispatch> <DispatchHelper::handleMessage> failed to handle message
javax.ejb.EJBException: Transaction was rolled back: timed out; nested exception is: java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
java.lang.Exception: No Exception - originate from:
java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
java.lang.Exception: No Exception - originate from:
at com.evermind.server.ejb.EJBUtils.makeException(EJBUtils.java:873)
at ICubeEngineLocalBean_StatelessSessionBeanWrapper0.handleWorkItem(ICubeEngineLocalBean_StatelessSessionBeanWrapper0.java:1479)
at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handle(PerformMessageHandler.java:45)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.Exception: No Exception - originate from:
at com.evermind.server.ejb.EJBUtils.makeException(EJBUtils.java:871)
... 10 more
javax.ejb.EJBException: Transaction was rolled back: timed out; nested exception is: java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
java.lang.Exception: No Exception - originate from:
at ICubeEngineLocalBean_StatelessSessionBeanWrapper0.handleWorkItem(ICubeEngineLocalBean_StatelessSessionBeanWrapper0.java:1479)
at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handle(PerformMessageHandler.java:45)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
<2006-09-18 08:08:34,129> <ERROR> <SRH.collaxa.cube.engine.dispatch> <BaseScheduledWorker::process> Failed to handle dispatch message ... exception ORABPEL-05002
Message handle error.
An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.PerformMessage"; the exception is: Transaction was rolled back: timed out; nested exception is: java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
java.lang.Exception: No Exception - originate from:
ORABPEL-05002
Message handle error.
An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.PerformMessage"; the exception is: Transaction was rolled back: timed out; nested exception is: java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
java.lang.Exception: No Exception - originate from:
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:152)
at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
<2006-09-18 08:09:05,236> <ERROR> <SRH.collaxa.cube> <BaseCubeSessionBean::logError> Error while invoking bean "activity manager": Scope not found.
The scope "BpSwt2.30995" has not been defined in the current instance.
ORABPEL-02094
Scope not found.
The scope "BpSwt2.30995" has not been defined in the current instance.
at com.collaxa.cube.engine.core.ScopeContext.getScope(ScopeContext.java:213)
at com.collaxa.cube.engine.core.WorkItem.setCubeInstance(WorkItem.java:259)
at com.collaxa.cube.engine.core.WorkItemFactory.init(WorkItemFactory.java:68)
at com.collaxa.cube.engine.core.WorkItemFactory.create(WorkItemFactory.java:58)
at com.collaxa.cube.engine.adaptors.common.BaseWorkItemPersistenceAdaptor.load(BaseWorkItemPersistenceAdaptor.java:147)
at com.collaxa.cube.engine.data.WorkItemPersistenceMgr.load(WorkItemPersistenceMgr.java:75)
at com.collaxa.cube.engine.CubeEngine.load(CubeEngine.java:5185)
at com.collaxa.cube.engine.CubeEngine.load(CubeEngine.java:5173)
at com.collaxa.cube.engine.CubeEngine.expireActivity(CubeEngine.java:2136)
at com.collaxa.cube.ejb.impl.ActivityManagerBean.expireActivity(ActivityManagerBean.java:145)
at com.collaxa.cube.ejb.impl.ActivityManagerBean.expireActivity(ActivityManagerBean.java:116)
at IActivityManagerLocalBean_StatelessSessionBeanWrapper52.expireActivity(IActivityManagerLocalBean_StatelessSessionBeanWrapper52.java:645)
at com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessageHandler.handle(ExpirationMessageHandler.java:43)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
<2006-09-18 08:09:05,274> <ERROR> <SRH.collaxa.cube.engine.dispatch> <DispatchHelper::handleMessage> failed to handle message
ORABPEL-02094
Scope not found.
The scope "BpSwt2.30995" has not been defined in the current instance.
at com.collaxa.cube.engine.core.ScopeContext.getScope(ScopeContext.java:213)
at com.collaxa.cube.engine.core.WorkItem.setCubeInstance(WorkItem.java:259)
at com.collaxa.cube.engine.core.WorkItemFactory.init(WorkItemFactory.java:68)
at com.collaxa.cube.engine.core.WorkItemFactory.create(WorkItemFactory.java:58)
at com.collaxa.cube.engine.adaptors.common.BaseWorkItemPersistenceAdaptor.load(BaseWorkItemPersistenceAdaptor.java:147)
at com.collaxa.cube.engine.data.WorkItemPersistenceMgr.load(WorkItemPersistenceMgr.java:75)
at com.collaxa.cube.engine.CubeEngine.load(CubeEngine.java:5185)
at com.collaxa.cube.engine.CubeEngine.load(CubeEngine.java:5173)
at com.collaxa.cube.engine.CubeEngine.expireActivity(CubeEngine.java:2136)
at com.collaxa.cube.ejb.impl.ActivityManagerBean.expireActivity(ActivityManagerBean.java:145)
at com.collaxa.cube.ejb.impl.ActivityManagerBean.expireActivity(ActivityManagerBean.java:116)
at IActivityManagerLocalBean_StatelessSessionBeanWrapper52.expireActivity(IActivityManagerLocalBean_StatelessSessionBeanWrapper52.java:645)
at com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessageHandler.handle(ExpirationMessageHandler.java:43)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
<2006-09-18 08:09:05,275> <ERROR> <SRH.collaxa.cube.engine.dispatch> <BaseScheduledWorker::process> Failed to handle dispatch message ... exception ORABPEL-05002
Message handle error.
An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessage"; the exception is: Scope not found.
The scope "BpSwt2.30995" has not been defined in the current instance.
ORABPEL-05002
Message handle error.
An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessage"; the exception is: Scope not found.
The scope "BpSwt2.30995" has not been defined in the current instance.
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:152)
at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
===============================================================These are the possible cause to the problem and their solutions:
Poor performance of the dehydration database If you are using Oracle Lite as dehydration store, please switch to use Oracle 9i or 10g. If Oracle 9i/10g is already in use, check the database parameter 'process' and 'session' to make sure it can handle the expected throughput.
OC4J has too few available connections to the dehydration database. Increase the maxConnection number of the BPELServerDataSource at the BPEL_HOME/integration/orabpel/system/appserver/oc4j/j2ee/home/config/data-sources.xml (for developer edition) or IAS_HOME/j2ee/OC4J_BPEL/config/data-sources.xml (mid-tier installation).
Size of message is too big Two ways to deal with this problem:
Increase the transaction timeout at PEL_HOME/integration/orabpel/system/appserver/oc4j/j2ee/home/config/server.xml (developer edition) or IAS_HOME/j2ee/OC4J_BPEL/config/server.xml (mid-tier installation)
Decrease the auditLevel from BPELConsole -> Manage BPEL Domain -> Configurations tab. Doing so will reduce the amount of data saved to the dehydration store.
Cheers
Anirudh Pucha -
After installing the most recent iTunes update/version iTunes will no longer run on my PC (Windows 7). I receive multiple error windows with the Microsoft error code R6034. Microsoft's Help site states that this error occurs when a driver attempts to access the C++ library without a "Manifest". I do not know what a manifest is, but apparently any attempt to directly access the C++ library is not permitted. The site instructs the viewer to contact the application developer.
Try the following user tip:
Troubleshooting issues with iTunes for Windows updates -
SAP work Process goes in run state,Users cannot login developer trace paste
Hi team,
We have a system which is at ECC6 release 701 ABAP + java system.
The work process frequently go in run state and since this is an IDES system, I always restart the system.
Please help me since i want tio know the root cause for the same.
The dev trace is as follows, and i beleive its a listener problem by the logs.
kernel runs with dp version 244000(ext=110000) (@(#) DPLIB-INT-VERSION-244000-UC)
length of sys_adm_ext is 576 bytes
SWITCH TRC-HIDE on ***
***LOG Q00=> DpSapEnvInit, DPStart (00 199004) [dpxxdisp.c 1287]
shared lib "dw_xml.dll" version 254 successfully loaded
shared lib "dw_xtc.dll" version 254 successfully loaded
shared lib "dw_stl.dll" version 254 successfully loaded
shared lib "dw_gui.dll" version 254 successfully loaded
shared lib "dw_mdm.dll" version 254 successfully loaded
rdisp/softcancel_sequence : -> 0,5,-1
use internal message server connection to port 3900
Mon Dec 13 08:26:23 2010
WARNING => DpNetCheck: NiHostToAddr(www.doesnotexist0223.qqq.nxst) took 6 seconds
<EsNT> Using memory model view.
<EsNT> Memory Reset disabled as NT default
<ES> 127 blocks reserved for free list.
ES initialized.
mm.dump: set maximum dump mem to 96 MB
Mon Dec 13 08:26:29 2010
J2EE server info
start = TRUE
state = STARTED
pid = 200040
argv[0] = D:\usr\sap\BI7\DVEBMGS00\exe\jcontrol.EXE
argv[1] = D:\usr\sap\BI7\DVEBMGS00\exe\jcontrol.EXE
argv[2] = pf=D:\usr\sap\BI7\SYS\profile\BI7_DVEBMGS00_q4de3gsy203
argv[3] = -DSAPSTART=1
argv[4] = -DCONNECT_PORT=65000
argv[5] = -DSAPSYSTEM=00
argv[6] = -DSAPSYSTEMNAME=BI7
argv[7] = -DSAPMYNAME=q4de3gsy203_BI7_00
argv[8] = -DSAPPROFILE=D:\usr\sap\BI7\SYS\profile\BI7_DVEBMGS00_q4de3gsy203
argv[9] = -DFRFC_FALLBACK=ON
argv[10] = -DFRFC_FALLBACK_HOST=localhost
start_lazy = 0
start_control = SAP J2EE startup framework
DpJ2eeStart: j2ee state = STARTED
rdisp/http_min_wait_dia_wp : 1 -> 1
***LOG CPS=> DpLoopInit, ICU ( 3.0 3.0 4.0.1) [dpxxdisp.c 1694]
***LOG Q0K=> DpMsAttach, mscon ( q4de3gsy203) [dpxxdisp.c 12697]
DpStartStopMsg: send start message (myname is >q4de3gsy203_BI7_00 <)
DpStartStopMsg: start msg sent
CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.
CCMS: start to initalize 3.X shared alert area (first segment).
DpMsgAdmin: Set release to 7000, patchlevel 0
MBUF state PREPARED
MBUF component UP
DpMBufHwIdSet: set Hardware-ID
***LOG Q1C=> DpMBufHwIdSet [dpxxmbuf.c 1050]
DpMsgAdmin: Set patchno for this platform to 254
Release check o.K.
DpJ2eeLogin: j2ee state = CONNECTED
Mon Dec 13 08:27:09 2010
my types changed after wp death/restart 0xbf --> 0xbd
my types changed after wp death/restart 0xbd --> 0xb5
my types changed after wp death/restart 0xb5 --> 0x95
Mon Dec 13 08:27:29 2010
ERROR => DpWPCheck: W1 (pid 199044) died (severity=0, status=0) [dpxxdisp.c 15841]
ERROR => DpWPCheck: W4 (pid 199912) died (severity=0, status=0) [dpxxdisp.c 15841]
ERROR => DpWPCheck: W6 (pid 192420) died (severity=0, status=0) [dpxxdisp.c 15841]
ERROR => DpWPCheck: W8 (pid 199528) died (severity=0, status=0) [dpxxdisp.c 15841]
ERROR => DpWPCheck: W9 (pid 198860) died (severity=0, status=0) [dpxxdisp.c 15841]
ERROR => DpWPCheck: W10 (pid 199664) died (severity=0, status=0) [dpxxdisp.c 15841]
my types changed after wp death/restart 0x95 --> 0x85
ERROR => DpWPCheck: W12 (pid 200036) died (severity=0, status=0) [dpxxdisp.c 15841]
Mon Dec 13 08:27:43 2010
***LOG Q0I=> NiIRead: recv (10054: WSAECONNRESET: Connection reset by peer) [nixxi.cpp 4424]
ERROR => NiIRead: SiRecv failed for hdl 6 / sock 316
(SI_ECONN_BROKEN/10054; I4; ST; 127.0.0.1:4882) [nixxi.cpp 4424]
ERROR => DpJ2eeMsgProcess: NiRead failed (NIECONN_BROKEN) [dpxxj2ee.c 1212]
DpJ2eeMsgProcess: j2ee state = CONNECTED (NIECONN_BROKEN)
Mon Dec 13 08:27:49 2010
ERROR => DpWPCheck: W0 (pid 200632) died (severity=0, status=0) [dpxxdisp.c 15841]
ERROR => DpWPCheck: W1 (pid 199044) died (severity=0, status=0) [dpxxdisp.c 15841]
my types changed after wp death/restart 0x85 --> 0x84
ERROR => DpWPCheck: W3 (pid 93796) died (severity=0, status=0) [dpxxdisp.c 15841]
ERROR => DpWPCheck: W4 (pid 199912) died (severity=0, status=0) [dpxxdisp.c 15841]
ERROR => DpWPCheck: W5 (pid 200484) died (severity=0, status=0) [dpxxdisp.c 15841]
ERROR => DpWPCheck: W6 (pid 192420) died (severity=0, status=0) [dpxxdisp.c 15841]
my types changed after wp death/restart 0x84 --> 0x80
ERROR => DpWPCheck: W8 (pid 199528) died (severity=0, status=0) [dpxxdisp.c 15841]
ERROR => DpWPCheck: W9 (pid 198860) died (severity=0, status=0) [dpxxdisp.c 15841]
ERROR => DpWPCheck: W10 (pid 199664) died (severity=0, status=0) [dpxxdisp.c 15841]
ERROR => DpWPCheck: W11 (pid 199720) died (severity=0, status=0) [dpxxdisp.c 15841]
ERROR => DpWPCheck: W12 (pid 200036) died (severity=0, status=0) [dpxxdisp.c 15841]
DP_FATAL_ERROR => DpWPCheck: no more work processes
DISPATCHER EMERGENCY SHUTDOWN ***
increase tracelevel of WPs
NiWait: sleep (10000ms) ...
NiISelect: timeout 10000ms
NiISelect: maximum fd=493
NiISelect: read-mask is NULL
NiISelect: write-mask is NULL
Mon Dec 13 08:27:59 2010
NiISelect: TIMEOUT occured (10000ms)
dump system status
Workprocess Table (long) Mon Dec 13 07:27:59 2010
========================
No Ty. Pid Status Cause Start Err Sem CPU Time Program Cl User Action Table
0 DIA 200632 Ended no 2 0 0
1 DIA 199044 Ended no 3 0 0
2 DIA 200280 Ended no 1 0 0
3 DIA 93796 Ended no 2 0 0
4 DIA 199912 Ended no 3 0 0
5 DIA 200484 Ended no 2 0 0
6 UPD 192420 Ended no 3 0 0
7 ENQ 199792 Ended no 1 0 0
8 BTC 199528 Ended no 3 0 0
9 BTC 198860 Ended no 3 0 0
10 BTC 199664 Ended no 3 0 0
11 SPO 199720 Ended no 2 0 0
12 UP2 200036 Ended no 3 0 0
Dispatcher Queue Statistics Mon Dec 13 07:27:59 2010
Switch off Shared memory profiling
ShmProtect( 57, 3 )
ShmProtect(SHM_PROFILE, SHM_PROT_RW
ShmProtect( 57, 1 )
ShmProtect(SHM_PROFILE, SHM_PROT_RD
DpWakeUpWps: wake up all wp's
Stop work processes
Stop gateway
killing process (184860) (SOFT_KILL)
Stop icman
killing process (190124) (SOFT_KILL)
Terminate gui connections
wait for end of work processes
wait for end of gateway
[DpProcDied] Process lives (PID:184860 HANDLE:440)
waiting for termination of gateway ...
NiWait: sleep (1000ms) ...
NiISelect: timeout 1000ms
NiISelect: maximum fd=493
NiISelect: read-mask is NULL
NiISelect: write-mask is NULL
Mon Dec 13 08:28:05 2010
NiISelect: TIMEOUT occured (1000ms)
[DpProcDied] Process died (PID:184860 HANDLE:440)
wait for end of icman
[DpProcDied] Process lives (PID:190124 HANDLE:448)
waiting for termination of icman ...
NiWait: sleep (1000ms) ...
NiISelect: timeout 1000ms
NiISelect: maximum fd=493
NiISelect: read-mask is NULL
NiISelect: write-mask is NULL
Mon Dec 13 08:28:06 2010
NiISelect: TIMEOUT occured (1000ms)
[DpProcDied] Process lives (PID:190124 HANDLE:448)
waiting for termination of icman ...
NiWait: sleep (1000ms) ...
NiISelect: timeout 1000ms
NiISelect: maximum fd=493
NiISelect: read-mask is NULL
NiISelect: write-mask is NULL
Mon Dec 13 08:28:07 2010
NiISelect: TIMEOUT occured (1000ms)
[DpProcDied] Process lives (PID:190124 HANDLE:448)
waiting for termination of icman ...
NiWait: sleep (1000ms) ...
NiISelect: timeout 1000ms
NiISelect: maximum fd=493
NiISelect: read-mask is NULL
NiISelect: write-mask is NULL
Mon Dec 13 08:28:08 2010
NiISelect: TIMEOUT occured (1000ms)
[DpProcDied] Process lives (PID:190124 HANDLE:448)
waiting for termination of icman ...
NiWait: sleep (1000ms) ...
NiISelect: timeout 1000ms
NiISelect: maximum fd=493
NiISelect: read-mask is NULL
NiISelect: write-mask is NULL
Mon Dec 13 08:28:09 2010
NiISelect: TIMEOUT occured (1000ms)
[DpProcDied] Process died (PID:190124 HANDLE:448)
[DpProcDied] Process died (PID:200040 HANDLE:424)
DpStartStopMsg: send stop message (myname is >q4de3gsy203_BI7_00 <)
AdGetSelfIdentRecord: > <
AdCvtRecToExt: opcode 60 (AD_SELFIDENT), ser 0, ex 0, errno 0
AdCvtRecToExt: opcode 4 (AD_STARTSTOP), ser 0, ex 0, errno 0
DpConvertRequest: net size = 189 bytes
NiBufSend starting
NiIWrite: hdl 3 sent data (wrt=562,pac=1,MESG_IO)
MsINiWrite: sent 562 bytes
send msg (len 110+452) to name -, type 4, key -
DpStartStopMsg: stop msg sent
NiIRead: hdl 3 received data (rcd=274,pac=1,MESG_IO)
server
NiIRead: hdl 3 recv would block (errno=EAGAIN)
NiIRead: read for hdl 3 timed out (0ms)
DpHalt: no more messages from the message server
DpHalt: send keepalive to synchronize with the message server
NiBufReceive starting
MsINiRead: received 114 bytes
MSG received, len 110+4, flag 3, from MSG_SERVER , typ 0, key -
Received 4 bytes from MSG_SERVER
Received opcode MS_NOOP from msg_server, reply MSOP_OK
MsOpReceive: ok
MsSendKeepalive : keepalive sent to message server
NiIRead: hdl 3 recv would block (errno=EAGAIN)
Mon Dec 13 08:28:10 2010
NiIPeek: peek for hdl 3 timed out (r; 1000ms)
NiIRead: read for hdl 3 timed out (1000ms)
DpHalt: no more messages from the message server
DpHalt: sync with message server o.k.
detach from message server
***LOG Q0M=> DpMsDetach, ms_detach () [dpxxdisp.c 13043]
NiBufSend starting
NiIWrite: hdl 3 sent data (wrt=110,pac=1,MESG_IO)
MsINiWrite: sent 110 bytes
MsIDetach: send logout to msg_server
MsIDetach: call exit function
DpMsShutdownHook called
NiBufISelUpdate: new MODE -- (r-) for hdl 3 in set0
SiSelNSet: set events of sock 368 to: ---
NiBufISelRemove: remove hdl 3 from set0
SiSelNRemove: removed sock 368 (pos=3)
SiSelNRemove: removed sock 368
NiSelIRemove: removed hdl 3
MBUF state OFF
AdGetSelfIdentRecord: > <
AdCvtRecToExt: opcode 60 (AD_SELFIDENT), ser 0, ex 0, errno 0
AdCvtRecToExt: opcode 40 (AD_MSBUF), ser 0, ex 0, errno 0
AdCvtRecToExt: opcode 40 (AD_MSBUF), ser 0, ex 0, errno 0
blks_in_queue/wp_ca_blk_no/wp_max_no = 1/300/13
LOCK WP ca_blk 1
make DISP owner of wp_ca_blk 1
DpSemRq: key: 2, units: 1, timeout: -1
DpSemRel: key: 2, units: 1
DpRqPutIntoQueue: put request into queue (reqtype 1, prio LOW, rq_id 15)
MBUF component DOWN
NiICloseHandle: shutdown and close hdl 3 / sock 368
NiBufIClose: clear extension for hdl 3
MsIDetach: detach MS-system
cleanup EM
EsCleanup ....
EmCleanup() -> 0
Es2Cleanup: Cleanup ES2
***LOG Q05=> DpHalt, DPStop ( 199004) [dpxxdisp.c 11230]
Good Bye .....
Please revert if you need more information.
Regards,
Prasad ShettyHI Juan,
trace file for dev_w0 as asked
C Starting user session: OCISessionBegin(con_hdl=0, usr=SAPSR3/<pwd>, svchp=0000000013FB7748, srvhp=0000000013FB9B78, usrhp=0000000013EA1EC8)
C Now 'SAPSR3/<pwd>@BI7' is connected: con_hdl=0, nls_hdl=0, session_id=65.
C Database NLS settings: AMERICAN_AMERICA.UTF8
C DB instance BI7 is running on Q4DE3GSY203 with ORACLE version 10.2.0.2.0 since DEC 13, 2010, 08:38:55
B Connection 0 opened (DBSL handle 0)
B Wp Hdl ConName ConId ConState TX HC PRM RCT FRC TIM MAX OPT Date Time DBHost
B 000 000 R/3 000000000 ACTIVE NO NO YES NO NO 000 255 255 20101213 083926 Q4DE3GSY203
C build_stmt: reallocating stmt buffer: 256 -> 2000 characters
M db_connect o.k.
M ICT: exclude compression: .zip,.cs,.rar,.arj,.z,.gz,.tar,.lzh,.cab,.hqx,.ace,.jar,.ear,.war,.css,.pdf,.js,.gzip,.uue,.bz2,.iso,.sda,.sar,.gif,*.png
I
I Mon Dec 13 08:40:14 2010
I MtxInit: 0 0 0
M SHM_PRES_BUF (addr: 0000000015860050, size: 4400000)
M SHM_ROLL_AREA (addr: 000007FFEA010050, size: 61440000)
M SHM_PAGING_AREA (addr: 0000000015CA0050, size: 32768000)
M SHM_ROLL_ADM (addr: 0000000017BF0050, size: 633840)
M SHM_PAGING_ADM (addr: 0000000017C90050, size: 525344)
M ThCreateNoBuffer allocated 544152 bytes for 1000 entries at 0000000017D20050
M ThCreateNoBuffer index size: 3000 elems
M ThCreateVBAdm allocated 12176 bytes (50 server) at 000000000B490050
X EmInit: MmSetImplementation( 2 ).
X MM global diagnostic options set: 0
X <ES> client 0 initializing ....
X Using implementation view
X ES initialized.
X mm.dump: set maximum dump mem to 96 MB
M Deactivate statistics hyper index locking
B dbntab: NTAB buffers attached
B dbntab: Buffer FTAB(hash header) (addr: 0000000017E400E0, size: 584)
B dbntab: Buffer FTAB(anchor array) (addr: 0000000017E40330, size: 320072)
B dbntab: Buffer FTAB(item array) (addr: 0000000017E8E580, size: 1280000)
B dbntab: Buffer FTAB(data area) (addr: 0000000017FC6D80, size: 30720000)
B dbntab: Buffer IREC(hash header) (addr: 0000000019D200E0, size: 584)
B dbntab: Buffer IREC(anchor array) (addr: 0000000019D20330, size: 320072)
B dbntab: Buffer IREC(item array) (addr: 0000000019D6E580, size: 320000)
B dbntab: Buffer IREC(data area) (addr: 0000000019DBC780, size: 6144000)
B dbntab: Buffer STAB(hash header) (addr: 000000001A3A00E0, size: 584)
B dbntab: Buffer STAB(anchor array) (addr: 000000001A3A0330, size: 320072)
B dbntab: Buffer STAB(item array) (addr: 000000001A3EE580, size: 320000)
B dbntab: Buffer STAB(data area) (addr: 000000001A43C780, size: 3072000)
B dbntab: Buffer TTAB(hash header) (addr: 000000001A7300E0, size: 1944)
B dbntab: Buffer TTAB(anchor array) (addr: 000000001A730880, size: 320072)
B dbntab: Buffer TTAB(item array) (addr: 000000001A77EAD0, size: 800000)
B dbntab: Buffer TTAB(data area) (addr: 000000001A841FD0, size: 5840000)
B db_con_shm_ini: WP_ID = 0, WP_CNT = 13, CON_ID = -1
B dbstat: TABSTAT buffer attached (addr: 000000001ADE9FB0)
B dbtbxbuf: Buffer TABL (addr: 000000001D7D0160, size: 30000000, end: 000000001F46C4E0)
B dbtbxbuf: Buffer TABLP (addr: 000000001F470160, size: 10240000, end: 000000001FE34160)
B dbexpbuf: Buffer EIBUF (addr: 000000001FE40170, size: 4194304, end: 0000000020240170)
B dbexpbuf: Buffer ESM (addr: 0000000020250170, size: 4194304, end: 0000000020650170)
B dbexpbuf: Buffer CUA (addr: 0000000020660170, size: 3072000, end: 000000002094E170)
B dbexpbuf: Buffer OTR (addr: 0000000020950170, size: 4194304, end: 0000000020D50170)
B dbcalbuf: Buffer CALE (addr: 0000000020D60050, size: 500000, end: 0000000020DDA170)
M CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.
S *** init spool environment
S TSPEVJOB updates inside critical section: event_update_nocsec = 0
S initialize debug system
T Stack direction is downwards.
T debug control: prepare exclude for printer trace
T new memory block 00000000141756E0
S spool kernel/ddic check: Ok
S using table TSP02FX for frontend printing
S 1 spool work process(es) found
S frontend print via spool service enabled
S printer list size is 150
S printer type list size is 50
S queue size (profile) = 300
S hostspool list size = 3000
S option list size is 30
S intervals: query=50, rescan=1800, global=300 info=120
S processing queue enabled
S creating spool memory service RSPO-RCLOCKS at 000000002A0700D0
S doing lock recovery
S setting server cache root
S using server cache size 100 (prof=100)
S creating spool memory service RSPO-SERVERCACHE at 000000002A0704F0
S using messages for server info
B dbtran INFO (init_connection '<DEFAULT>' [ORACLE:700.08]):
B max_blocking_factor = 5, max_in_blocking_factor = 5,
B min_blocking_factor = 5, min_in_blocking_factor = 5,
B prefer_union_all = 0, prefer_join = 0,
B prefer_fix_blocking = 0, prefer_in_itab_opt = 1,
B convert AVG = 0, alias table FUPD = 0,
B escape_as_literal = 1, opt GE LE to BETWEEN = 0,
B select * =0x0f, character encoding = STD / <none>:-,
B use_hints = abap->1, dbif->0x1, upto->2147483647, rule_in->0,
B rule_fae->0, concat_fae->0, concat_fae_or->0
S
S Mon Dec 13 08:40:15 2010
S size of spec char cache entry: 297032 bytes (timeout 100 sec)
S size of open spool request entry: 2512 bytes
S immediate print option for implicitely closed spool requests is disabled
A **GENER Trace switched on ***
A
A -PXA--
A PXA INITIALIZATION
A PXA: Locked PXA-Semaphore.
A System page size: 4kb, total admin_size: 20564kb, dir_size: 20472kb.
A Attached to PXA (address 000007FFEDAB0050, size 300000K)
A abap/pxa = shared protect gen_remote
A PXA INITIALIZATION FINISHED
A -PXA--
A
A ABAP ShmAdm attached (addr=000007FF4FEEA000 leng=20955136 end=000007FF512E6000)
A >> Shm MMADM area (addr=000007FF50392E80 leng=247168 end=000007FF503CF400)
A >> Shm MMDAT area (addr=000007FF503D0000 leng=15818752 end=000007FF512E6000)
A RFC Destination> destination q4de3gsy203_BI7_00 host q4de3gsy203 system BI7 systnr 0 (q4de3gsy203_BI7_00)
A RFC Options> H=q4de3gsy203,S=00,d=2,
A RFC FRFC> fallback activ but this is not a central instance.
A
A RFC rfc/signon_error_log = -1
A RFC rfc/dump_connection_info = 0
A RFC rfc/dump_client_info = 0
A RFC rfc/cp_convert/ignore_error = 1
A RFC rfc/cp_convert/conversion_char = 23
A RFC rfc/wan_compress/threshold = 251
A RFC rfc/recorder_pcs not set, use defaule value: 2
A RFC rfc/delta_trc_level not set, use default value: 0
A RFC rfc/no_uuid_check not set, use default value: 0
A RFC rfc/bc_ignore_thcmaccp_retcode not set, use default value: 0
A RFC Method> initialize RemObjDriver for ABAP Objects
M ThrCreateShObjects allocated 27042 bytes at 000000002A9E0050
N
N Mon Dec 13 08:40:16 2010
N SsfSapSecin: putenv(SECUDIR=D:\usr\sap\BI7\DVEBMGS00\sec): ok
N
N =================================================
N === SSF INITIALIZATION:
N ===...SSF Security Toolkit name SAPSECULIB .
N ===...SSF trace level is 0 .
N ===...SSF library is D:\usr\sap\BI7\DVEBMGS00\exe\sapsecu.dll .
N ===...SSF hash algorithm is SHA1 .
N ===...SSF symmetric encryption algorithm is DES-CBC .
N ===...sucessfully completed.
N =================================================
N
N Mon Dec 13 08:40:17 2010
N MskiInitLogonTicketCacheHandle: Logon Ticket cache pointer retrieved from shared memory.
N MskiInitLogonTicketCacheHandle: Workprocess runs with Logon Ticket cache.
M JrfcVmcRegisterNativesDriver o.k.
W =================================================
W === ipl_Init() called
W ITS Plugin: Path dw_gui
W ITS Plugin: Description ITS Plugin - ITS rendering DLL
W ITS Plugin: sizeof(SAP_UC) 2
W ITS Plugin: Release: 700, [7000.0.254.20050900]
W ITS Plugin: Int.version, [33]
W ITS Plugin: Feature set: [22]
W ===... Calling itsp_Init in external dll ===>
W === ipl_Init() returns 0, ITSPE_OK: OK
W =================================================
N VSI: WP init in ABAP VM completed with rc=0
E Profile-Parameter: enque/deque_wait_answer = FALSE
E Profile-Parameter: enque/sync_dequeall = 0
E Replication is disabled
E EnqCcInitialize: local lock table initialization o.k.
E EnqId_SuppressIpc: local EnqId initialization o.k.
E EnqCcInitialize: local enqueue client init o.k.
S
S Mon Dec 13 08:40:19 2010
S found spool memory service RSPO-ACTIONS at 000000002A07A230
A
A Mon Dec 13 08:40:20 2010
A **GENER Trace switched off ***
M SosICreateNewAnchorArray: sos_search_anchor_semantics = 1
C
C Mon Dec 13 08:40:21 2010
C build_stmt: reallocating stmt buffer: 2000 -> 3002 characters
B table logging switched on for client '800'
M
M Mon Dec 13 08:40:23 2010
M SecAudit(RsauShmInit): WP attached to existing shared memory.
M SecAudit(RsauShmInit): addr of SCSA........... = 000000000AFC0050
M SecAudit(RsauShmInit): addr of RSAUSHM........ = 000000000AFC07C0
M SecAudit(RsauShmInit): addr of RSAUSLOTINFO... = 000000000AFC0800
M SecAudit(RsauShmInit): addr of RSAUSLOTS...... = 000000000AFC080C
M rdisp/rb_cleaned_rfc = 0
M
M Mon Dec 13 08:40:27 2010
M Deactivate ASTAT hyper index locking
M
M Mon Dec 13 08:44:30 2010
M
M *****************************************************************************
M *
M * LOCATION SAP-Gateway on host q4de3gsy203 / sapgw00
M * ERROR program dbmrfc@sapdb not registered
M *
M * TIME Mon Dec 13 08:44:30 2010
M * RELEASE 700
M * COMPONENT SAP-Gateway
M * VERSION 2
M * RC 679
M * MODULE gwr3cpic.c
M * LINE 1835
M * DETAIL TP dbmrfc@sapdb not registered
M * COUNTER 15
M *
M *****************************************************************************
M
A RFC 1485 CONVID 21905907
A * CMRC=2 DATA=0 STATUS=0 SAPRC=679 ThSAPOCMINIT
A RFC> ABAP Programm: SAPLSADC (Transaction: )
A RFC> User: RANGUPTA (Client: 001)
A RFC> Destination: SAPDB_DBM_DAEMON (handle: 2, , )
A RFC SERVER> RFC Server Session (handle: 1, 21904860, {D18C06E0-7859-F141-92A8-005056956B4B})
A RFC SERVER> Caller host:
A RFC SERVER> Caller transaction code: (Caller Program: SAPLSADC)
A RFC SERVER> Called function module: DBM_CONNECT_PUR
A TH VERBOSE LEVEL FULL
A ** RABAX: end RX_GET_MESSAGE
M
M Mon Dec 13 08:45:54 2010
M
M *****************************************************************************
M *
M * LOCATION SAP-Gateway on host q4de3gsy203 / sapgw00
M * ERROR program dbmrfc@sapdb not registered
M *
M * TIME Mon Dec 13 08:45:54 2010
M * RELEASE 700
M * COMPONENT SAP-Gateway
M * VERSION 2
M * RC 679
M * MODULE gwr3cpic.c
M * LINE 1835
M * DETAIL TP dbmrfc@sapdb not registered
M * COUNTER 30
M *
M *****************************************************************************
M
A RFC 1485 CONVID 21998657
A * CMRC=2 DATA=0 STATUS=0 SAPRC=679 ThSAPOCMINIT
A RFC> ABAP Programm: SAPLSADC (Transaction: )
A RFC> User: RANGUPTA (Client: 001)
A RFC> Destination: SAPDB_DBM_DAEMON (handle: 2, , )
A RFC SERVER> RFC Server Session (handle: 1, 21997642, {038D06E0-8E49-F147-92A8-005056956B4B})
A RFC SERVER> Caller host:
A RFC SERVER> Caller transaction code: (Caller Program: SAPLSADC)
A RFC SERVER> Called function module: DBM_CONNECT_PUR
A TH VERBOSE LEVEL FULL
A ** RABAX: end RX_GET_MESSAGE
M
M Mon Dec 13 08:48:12 2010
M
M *****************************************************************************
M *
M * LOCATION SAP-Gateway on host q4de3gsy203 / sapgw00
M * ERROR program dbmrfc@sapdb not registered
M *
M * TIME Mon Dec 13 08:48:12 2010
M * RELEASE 700
M * COMPONENT SAP-Gateway
M * VERSION 2
M * RC 679
M * MODULE gwr3cpic.c
M * LINE 1835
M * DETAIL TP dbmrfc@sapdb not registered
M * COUNTER 45
M *
M *****************************************************************************
M
A RFC 1485 CONVID 22146986
A * CMRC=2 DATA=0 STATUS=0 SAPRC=679 ThSAPOCMINIT
A RFC> ABAP Programm: SAPLSADC (Transaction: )
A RFC> User: RANGUPTA (Client: 001)
A RFC> Destination: SAPDB_DBM_DAEMON (handle: 2, , )
A RFC SERVER> RFC Server Session (handle: 1, 22145986, {558D06E0-45BF-F199-92A8-005056956B4B})
A RFC SERVER> Caller host:
A RFC SERVER> Caller transaction code: (Caller Program: SAPLSADC)
A RFC SERVER> Called function module: DBM_CONNECT_PUR
A TH VERBOSE LEVEL FULL
A ** RABAX: end RX_GET_MESSAGE
M
M Mon Dec 13 08:49:33 2010
M
M *****************************************************************************
M *
M * LOCATION SAP-Gateway on host q4de3gsy203 / sapgw00
M * ERROR program dbmrfc@sapdb not registered
M *
M * TIME Mon Dec 13 08:49:33 2010
M * RELEASE 700
M * COMPONENT SAP-Gateway
M * VERSION 2
M * RC 679
M * MODULE gwr3cpic.c
M * LINE 1835
M * DETAIL TP dbmrfc@sapdb not registered
M * COUNTER 60
M *
M *****************************************************************************
It is a bit large will this do ?
Regards,
Prasad -
How to delay a long running tasks start until display is updated?
I am having a problem in that a progress bar I want to use to show progress of a long running background process is not showing up for a long time (up to 10 seconds) after the long running process is started. This is in an AIR application and the background process is an external native process, so once it is launched the UI thread is free to run, but the launch of the process can take time.
Below is the current state of the relevant code.
In addition to the current format I have also tried using the CREATION_COMPLETE, EXIT_FRAME and RENDER events with the same results.
If I up the value in setTimeout to 500ms the progress bar displays quickly, but I would prefer to not delay the launch of the background process for no reason.
If I comment out the loadPorject call the progress bar is displayed instantly.
Any help is appreciated.
private function continueLoad(evt:Event):void
// We are about to start some potentially long running process
CursorManager.setBusyCursor();
curPopup = new SyncProgress();
curPopup.addEventListener(Event.ENTER_FRAME, popupLoadedHandler);
PopUpManager.addPopUp(curPopup, parentView, true);
PopUpManager.centerPopUp(curPopup);
curPopup.stage.invalidate();
private function popupLoadedHandler(event:Event):void
curPopup.removeEventListener(Event.ENTER_FRAME, popupLoadedHandler);
setTimeout(function():void{syncManager.loadProject(mainViewModel.selectedUserItem.id,proj ectFile.nativePath,overwrite);},0);DBMS_SCHEDULER is very powerful and can be a bit unwieldy. I tend to use DBMS_SCHEDULER for jobs which are purely 'in the database' i.e. not specifically APEX-related - in addition, I find it's better for stuff that needs to be run regularly without human intervention (some sort of refresh process, daily cleanup etc).
If you are intending to run this process from APEX as a pseudo "on demand" process (i.e. generated by a user request) and have quite simple requirements (e.g. there's no dependencies on other jobs), it might be worth checking out the apex scheduling API - namely the package APEX_PLSQL_JOB:
http://download.oracle.com/docs/cd/E14373_01/apirefs.32/e13369/apex_plsql_job.htm#BGBCJIJI
It generates a unique job number which you can use to reference its progress - plus it's much simpler to use.
p.s. using DBMS_SCHEDULER, yes the job name has to be unique but you can generate one by either using a sequence or data not likely to be repeated, like the current timestamp. -
Long running table partitioning job
Dear HANA grus,
I've just finished table partitioning jobs for CDPOS(change document item) with 4 partitions by hash with 3 columns.
Total data volumn is around 340GB and the table size was 32GB !!!!!
(migration job was done without disabling CD, so currently deleting data on the table with RSCDOK99)
Before partitioning, the data volumn of the table was around 32GB.
After partitioning, the size has changed to 25GB.
It took around One and half hour with exclusive lock as mentioned in the HANA adminitration guide.
(It is QA DB, so less complaints)
I thought that I might not can do this in the production DB.
Does anyone hava any idea for accelerating this task?? (This is the fastest DBMS HANA!!!!)
Or Do you have any plan for online table partitioning functionality??(To HANA Development team)
Any comments would be appreciate.
Cheers,
- JasonJason,
looks like we're cross talking here...
What was your rationale to partition the table in the first place?
=> To reduce deleting time of CDPOS (As I mentioned it was almost 10% quantity of whole Data volume, So I would like to save deleting time of the table from any pros of partitioning table like partitioning pruning)
Ok, I see where you're coming from, but did you ever try out if your idea would actually work?
As deletion of data is heavily related with locating the records to be deleted, creating an index would have probably be the better choice.
Thinking about it... you want to get rid of 10% of your data and in order to speed the overall process up, you decide to move 100% of the data into sets of 25% of the data - equally holding their 25% share of the 10% records to be deleted.
The deletion then should run along these 4 sets of 25% of data.
It's surely me, but where is the speedup potential here?
How many unloads happened during the re-partitioning?
=> It was fully uploaded in the memory before partitioning the table by myself.(from HANA studio)
I was actually asking about unloads _during_ the re-partitioning process. Check M_CS_UNLOADS for the time frame in question.
How do the now longer running SQL statements look like?
=> As i mentioned selecting/deleting increased almost twice.
That's not what I asked.
Post the SQL statement text that was taking longer.
What are the three columns you picked for partitioning?
=> mandant, objectclas, tabname(QA has 2 clients and each of them have nearly same rows of the table)
Why those? Because these are the primary key?
I wouldn't be surprised if the SQL statements only refer to e.g. MANDT and TABNAME in the WHERE clause.
In that case the partition pruning cannot work and all partitions have to be searched.
How did you come up with 4 partitions? Why not 13, 72 or 213?
=> I thought each partitions' size would be 8GB(32GB/4) if they are divided into same size(just simple thought), and 8GB size is almost same size like other largest top20 tables in the HANA DB.
Alright, so basically that was arbitrary.
For the last comment of your reply, most people would do partition for their existing large tables to get any benefit of partitioning(just like me). I think your comment can be applied for the newly inserting data.
Well, not sure what "most people" would do.
HASH partitioning a large existing table certainly is not an activity that is just triggered off in a production system. Adding partitions to a range partitions table however happens all the time.
- Lars -
Erorr calling long running sync web service
Hello
I have definied simple async process:
assign (from process input to ws invoke input)
sync ws invoke
assign (from ws invoke output to process output)
Sync Web Service is long running (few minutes). In order to avoid timeout I have accordingly set sync-max-wait-time property.
I have observed that after starting process instance I can't see it in BPEL Console (however I know it is working). Furthermore when invoke activity ends (so instance state must be saved in database) I can see following error on system console:
<BaseCubeSessionBean::logError> Error while invoking bean "delivery": Cannot ins
ert audit trail.
The process domain was unable to insert the current log entries for the instance
"2314" to the audit trail table. The exception reported is: RollbackException:
The transaction has been marked for rollback (timed out)
Please check that the machine hosting the datasource is physically connected to
the network. Otherwise, check that the datasource connection parameters (user/p
assword) is currently valid.
sql statement: INSERT INTO audit_trail ( cikey, domain_ref, count_id, log ) VALU
ES ( ?, ?, ?, ? )
<2005-01-06 13:14:10,268> <ERROR> <default.collaxa.cube.engine.dispatch> <BaseSc
heduledWorker::process> Failed to handle dispatch message invoke instance messag
e 0c92305db480f36d:149b290:10147dc1b2e:-7fd6 ... exception Message handle error.
An exception occurred while attempting to process the message "com.collaxa.cube.
engine.dispatch.message.invoke.InvokeInstanceMessage"; the exception is: Transac
tion was rolled back: timed out; nested exception is: java.rmi.RemoteException:
No Exception - originate from:java.lang.Exception: No Exception - originate from
:; nested exception is:
java.lang.Exception: No Exception - originate from:
Best RegardsHi,
There are 2 ways to work around the error that you are seeing.
Option #1: increase the JTA timeout of the underlying application server.
Option #2: in the bpel.xml of your process, add a "nonBlockingInvoke" property to the partnerLink representing the interaction with the long running service.
Option #2 should also address the fact that the instance is not visible in the bpel console.
Edwin -
Hi All,
I have a long running sql which I am tuning for oltp environment.
Here is the sql
explain plan for
SELECT a.* ,rownum as rnm
FROM ( SELECT /*+ FIRST_ROWS(100) STAR_TRANSFORMATION PARALLEL(PLS,2) */
/* End of Hint in Query Builder */
PLD.PRVDR_LCTN_IID AS "ProviderLocationIid", PLD.PRVDR_LCTN_DTL_SID AS "ProviderLocationDetailSid",
PLD.ENRLMNT_TYPE_CID AS "EnrollMentTypeCid", PLD.PRVDR_TYPE_CODE AS "ProviderTypeCode",
PLD.MAINECARE_ID AS "Provider Id", PLD.PRVDR_NAME AS "Provider Name",
PLD.PRVDR_TYPE_CODE || '-' || PLD.PRVDR_TYPE_NAME AS "Provider Type",
TO_CHAR(PLS.FROM_DATE,'MM/dd/yyyy') AS "Start Date",
TO_CHAR(PLS.TO_DATE,'MM/dd/yyyy') AS "End Date", PLD.COUNTY_NAME AS "County",
PLD.CITY_TOWN_NAME AS "Town", PLD.ENRLMNT_TYPE_NAME AS "Enrollment Type",
PLS.STATUS_CID AS "StatusCid", STSBS.STATUS_NAME AS "Business Status",
PLD.LCTN_PHONE_NMBR AS "Phone Number", PLD.PRVDR_TYPE_NAME AS "PrvdrTypeName",
SP.SPCLTY_CODE||'-'||SP.SPCLTY_NAME ||'/'|| SP1.SPCLTY_CODE||'-'||
SP1.SPCLTY_NAME AS "Specialty/Subspecialty",
UPPER(SP1.SPCLTY_CODE) AS "SubSpclty", UPPER(SP.SPCLTY_CODE) AS "Spclty"
FROM /*Query Builder Clause*/
STATUS STS,
STATUS STSBS,
SPECIALTY_SUBSPECIALTY SSP,
(SELECT PRVDR_LCTN_STATUS_SID, PRVDR_LCTN_IID, PRVDR_LCTN_DTL_SID, FROM_DATE, TO_DATE,
STATUS_TYPE_CID, STATUS_CID, OPRTNL_FLAG,
FN_GETANCHORDT(FROM_DATE,TO_DATE) AS ANCHOR_DATE
FROM PRVDR_LCTN_STATUS
WHERE STATUS_TYPE_CID = 1
AND OPRTNL_FLAG = 'A'
) PLS,
PRVDR_LCTN_X_SPCLTY_SUBSPCLTY PXSP,
PRVDR_LCTN_STATUS PLSBS,
PROVIDER_LOCATION_DETAIL PLD,
SPECIALTY SP1,
SPECIALTY SP
WHERE
STS.STATUS_TYPE_CID = 1
AND STS.STATUS_CID = 2
AND STSBS.STATUS_TYPE_CID = 15
AND PLSBS.OPRTNL_FLAG = 'A'
-- UPPER(UPPER(SP1.SPCLTY_CODE)) LIKE UPPER('1%')
AND SP1.SPCLTY_CODE LIKE '1%'
-- AND UPPER(UPPER(SP.SPCLTY_CODE)) LIKE UPPER('1%')
AND SP.SPCLTY_CODE LIKE '1%'
AND PLS.OPRTNL_FLAG = 'A'
AND SP1.OPRTNL_FLAG = 'A'
AND PXSP.OPRTNL_FLAG = 'A'
AND PXSP.STATUS_CID = 2
AND SSP.OPRTNL_FLAG = 'A'
AND SP.OPRTNL_FLAG = 'A'
AND PLS.ANCHOR_DATE >= PLSBS.FROM_DATE
AND PLS.ANCHOR_DATE <= PLSBS.TO_DATE
AND PLS.STATUS_TYPE_CID = STS.STATUS_TYPE_CID
AND PLS.STATUS_CID = STS.STATUS_CID
AND PLD.PRVDR_LCTN_DTL_SID = PLS.PRVDR_LCTN_DTL_SID
AND PLSBS.PRVDR_LCTN_IID = PLS.PRVDR_LCTN_IID
AND PLSBS.STATUS_TYPE_CID = STSBS.STATUS_TYPE_CID
AND PLSBS.STATUS_CID = STSBS.STATUS_CID
AND PLS.ANCHOR_DATE >= SP1.FROM_DATE
AND PLS.ANCHOR_DATE <= SP1.TO_DATE
AND PXSP.PRVDR_LCTN_IID = PLS.PRVDR_LCTN_IID
AND PXSP.SPCLTY_SUBSPCLTY_SID = SSP.SPCLTY_SUBSPCLTY_SID
AND PLS.ANCHOR_DATE >= PXSP.FROM_DATE
AND PLS.ANCHOR_DATE <= PXSP.TO_DATE
AND SSP.SPCLTY_CODE = SP.SPCLTY_CODE
-- AND SSP.SUBSPCLTY_CODE = SP1.SPCLTY_CODE
AND SSP.SUBSPCLTY_CODE = SP1.SPCLTY_CODE
AND PLS.ANCHOR_DATE >= SSP.FROM_DATE
AND PLS.ANCHOR_DATE <= SSP.TO_DATE
AND PLS.ANCHOR_DATE >= SP.FROM_DATE
AND PLS.ANCHOR_DATE <= SP.TO_DATE
ORDER BY /*Query Builder Clause*/
"Provider Id" DESC
) A
WHERE rownum < 101
Here is the Emplain plan
SQL> @c:\mohammed\tune\UTLXPLS
Plan Table
| Operation | Name | Rows | Bytes| Cost | Pstart| Pstop |
| SELECT STATEMENT | | | | | | |
| COUNT STOPKEY | | | | | | |
| VIEW | | | | | | |
| SORT ORDER BY STOPKEY | | 1 | 358 | 120 | | |
| SORT ORDER BY STOPKEY | | | | | | |
| NESTED LOOPS | | 1 | 358 | 117 | | |
| NESTED LOOPS | | 1 | 313 | 116 | | |
| NESTED LOOPS | | 1 | 268 | 115 | | |
| NESTED LOOPS | | 1 | 240 | 114 | | |
Plan Table
| NESTED LOOPS | | 1 | 209 | 112 | | |
| NESTED LOOPS | | 1 | 95 | 111 | | |
| NESTED LOOPS | | 1 | 74 | 110 | | |
| NESTED LOOPS | | 7 | 294 | 103 | | |
| INDEX UNIQUE SCAN |SYS_C00489936 | 1 | 7 | | | |
| TABLE ACCESS FULL |PRVDR_LCTN_STATUS | 1K| 53K| 102 | | |
| TABLE ACCESS BY INDEX ROWID |PRVDR_LCTN_STATUS | 57K| 1M| 2 | | |
| INDEX RANGE SCAN |TUNE_PNBS2_1 | 57K| | 1 | | |
| TABLE ACCESS BY INDEX ROWID |STATUS | 5 | 105 | 1 | | |
| INDEX UNIQUE SCAN |SYS_C00489936 | 5 | | | | |
| TABLE ACCESS BY INDEX ROWID |PROVIDER_LOCATION_D | 40K| 4M| 1 | | |
Plan Table
| INDEX UNIQUE SCAN |XPKPROVIDER_LOCATIO | 40K| | | | |
| TABLE ACCESS BY INDEX ROWID |PRVDR_LCTN_X_SPCLTY | 1M| 39M| 3 | | |
| INDEX RANGE SCAN |TUNE_SARWAR_0503200 | 1M| | 2 | | |
| TABLE ACCESS BY INDEX ROWID |SPECIALTY_SUBSPECIA | 549 | 15K| 1 | | |
| INDEX UNIQUE SCAN |SYS_C00489888 | 549 | | | | |
| TABLE ACCESS BY INDEX ROWID |SPECIALTY | 11 | 495 | 1 | | |
| INDEX UNIQUE SCAN |SYS_C00489875 | 11 | | | | |
| TABLE ACCESS BY INDEX ROWID |SPECIALTY | 11 | 495 | 1 | | |
| INDEX UNIQUE SCAN |SYS_C00489875 | 11 | | | | |
32 rows selected.
I have tried with several hints and several driving tables and tires. Any help in this regard will be highly appreciated.
Thanks a lot,
Mohammed Sarwar
ocp dba
Email: [email protected]
[email protected]
Phone : 301-944-2029 w
913-484-9204 cellThis should be better. Any help on tuning the above sql statement using the following explain plan will be highly appreciated.
Plan Table
| Operation ------------------| Name -------------| Rows | Bytes| Cost | Pstart| Pstop |
| SELECT STATEMENT -----------| ------------------| -----| -------|------| | |
| COUNT STOPKEY --------------|-------------------|------|--------|------| | |
| VIEW -----------------------|-------------------|----- | -------| -----| | |
| SORT ORDER BY STOPKEY ------|------------------ |--- 1 | ---358 | 120 -| | |
| SORT ORDER BY STOPKEY ------| ------------------|----- |------- | -----| | |
| NESTED LOOPS ---------------|-------------------|--- 1 |--358 -|- 117 | | |
| NESTED LOOPS ---------------|----------------- -|--- 1 | -313 -| -116 | | |
| NESTED LOOPS ---------------|----------------- -|--- 1 | 268-- | 115 -| | |
| NESTED LOOPS--------------- |-------------------| --1- | -240 -| -114 | | |
Plan Table
| NESTED LOOPS--------------- |------------------ | ---1 |- 209 -|- 112 | | |
| NESTED LOOPS--------------- | ------------------|--- 1 |-- 95- | -111 | | |
| NESTED LOOPS ---------------|----- -------------|--- 1 |-- 74 -| -110 | | |
| NESTED LOOPS ---------------|----------------- -|--- 7 | -294- |- 103| | |
| INDEX UNIQUE SCAN ----------|SYS_C00489936------| ---1 |--- 7--|-----| | |
| TABLE ACCESS FULL ----------|PRVDR_LCTN_STATUS -| --1K | 53K-- | 102 | | |
| TABLE ACCESS BY INDEX ROWID |PRVDR_LCTN_STATUS- | 57K -|---- 1M|-- 2 | | |
| INDEX RANGE SCAN -----------|TUNE_PNBS2_1 ------| 57K- |------ |-- 1 | | |
| TABLE ACCESS BY INDEX ROWID |STATUS------------ | 5 |105----|-- 1 | | |
| INDEX UNIQUE SCAN---------- |SYS_C00489936 -----| 5--- | ------|-----| | |
| TABLE ACCESS BY INDEX ROWID-|PROVIDER_LOCATION_D| 40K | 4M----|-- 1 | | |
Plan Table
| INDEX UNIQUE SCAN ----------|XPKPROVIDER_LOCATIO| 40K |----- |----- | | |
| TABLE ACCESS BY INDEX ROWID-|PRVDR_LCTN_X_SPCLTY| 1M -|---39M|--- 3 | | |
| INDEX RANGE SCAN -----------|TUNE_SARWAR_0503200| 1M -| -----|--- 2 | | |
|TABLE ACCESS BY INDEX ROWID- |SPECIALTY_SUBSPECIA| 549 |---15K| ---1 | | |
| INDEX UNIQUE SCAN ----------|SYS_C00489888 -----| 549 |----- | -----| | |
|TABLE ACCESS BY INDEX ROWID- |SPECIALTY ---------| 11- |---495|--- 1 | | |
| INDEX UNIQUE SCAN ----------|SYS_C00489875----- | 11 -|----- |----- | | |
|TABLE ACCESS BY INDEX ROWID -|SPECIALTY ---------| 11- |---495|----1 | | |
| INDEX UNIQUE SCAN-----------|SYS_C00489875----- | 11 -|----- |----- | | |
-------------------------------------------------------------------------------- -
Explain for a very long running query
Dear gurus,
I have an issue with a long running query which takes around 2 hrs to execute. The tables being used here pertains to 11i, so there is no scope of indexing.
SELECT peia.expenditure_item_id, DECODE (peia.system_linkage_function, 'ST', 'TIME', 'EXP' ) AS CATEGORY,
pea.incurred_by_person_id AS employee_id, emp.attribute6 AS q_number, NVL (emp.employee_number, npw_number) AS employee_number, emp.full_name AS employee_name, peia.project_id,
ppa.segment1, ppa.NAME, func_get_proj_attribute (peia.project_id, NULL, 'PROJECT ENTITY NAME' ) AS project_entity,
func_get_proj_attribute (peia.project_id, NULL, 'PROJECT MANAGER') AS project_manager,
DECODE (ppa.distribution_rule, 'WORK/WORK', 'TM', 'WORK/EVENT', 'TM with Milestone' ) AS project_classification,
ppa.project_type AS funding_type, func_get_proj_attribute(peia.project_id, NULL, 'CUSTOMER GROUP' ) AS customer_group,
func_get_proj_attribute(peia.project_id, NULL, 'ACCOUNT MANAGER' ) AS account_manager,
pt.top_task_id, func_get_task_attribute(pt.top_task_id, 'TASK NUMBER' ) AS task_number,
func_get_task_attribute (pt.top_task_id, 'TASK NAME' ) AS task_name, peia.expenditure_item_date, peia.projfunc_raw_revenue AS func_raw_revenue,
peia.accrued_revenue AS func_accrued_revenue, peia.projfunc_currency_code,
DECODE (peia.project_raw_revenue, NULL,
DECODE (peia.system_linkage_function, 'ST', peia.quantity* NVL (peia.bill_rate, func_get_emp_billrate (pea.incurred_by_person_id, peia.project_id, peia.task_id,
peia.expenditure_item_date )
peia.quantity
peia.project_raw_revenue
( peia.accrued_revenue
/ peia.projfunc_raw_revenue
* peia.project_raw_revenue
) AS project_accrued_revenue,
ppa.project_currency_code,
NVL(peia.bill_rate, func_get_emp_billrate (pea.incurred_by_person_id, peia.project_id, peia.task_id, peia.expenditure_item_date)
) AS bill_rate,
peia.rev_dist_rejection_code, SYSDATE AS generated_date
FROM pa_expenditures_all pea
INNER JOIN (SELECT * FROM per_all_people_f WHERE SYSDATE BETWEEN effective_start_date AND effective_end_date) emp ON NVL(pea.incurred_by_person_id, 61) =emp.person_id
INNER JOIN (SELECT * FROM pa_expenditure_items_all WHERE billable_flag = 'Y' AND quantity <> 0) peia ON pea.expenditure_id =peia.expenditure_id
INNER JOIN (SELECT * FROM pa_projects_all WHERE project_status_code = 'APPROVED' AND distribution_rule IN ('WORK/WORK', 'WORK/EVENT')) ppa ON peia.project_id =ppa.project_id
INNER JOIN pa_tasks pt ON peia.task_id = pt.task_id;
The explain plan for this is:
SELECT STATEMENT CHOOSECost: 26,758 Bytes: 53,373,971 Cardinality: 245,963
9 HASH JOIN Cost: 26,758 Bytes: 53,373,971 Cardinality: 245,963
1 TABLE ACCESS FULL TABLE HR.PER_ALL_PEOPLE_F Cost: 67 Bytes: 546,900 Cardinality: 9,115
8 HASH JOIN Cost: 26,581 Bytes: 20,174,029 Cardinality: 128,497
2 TABLE ACCESS FULL TABLE PA.PA_TASKS Cost: 596 Bytes: 856,370 Cardinality: 85,637
7 HASH JOIN Cost: 25,691 Bytes: 18,889,059 Cardinality: 128,497
3 TABLE ACCESS FULL TABLE PA.PA_EXPENDITURES_ALL Cost: 1,524 Bytes: 5,220,330 Cardinality: 522,033
6 HASH JOIN Cost: 23,701 Bytes: 17,604,089 Cardinality: 128,497
4 TABLE ACCESS FULL TABLE PA.PA_PROJECTS_ALL Cost: 91 Bytes: 49,059 Cardinality: 621
5 TABLE ACCESS FULL TABLE PA.PA_EXPENDITURE_ITEMS_ALL Cost: 23,575 Bytes: 68,913,570 Cardinality: 1,188,165
Can anyone suggests what can be done to improve this query?
Thanks in advance
SA
Edited by: user593719 on Oct 5, 2010 10:29 AM
Edited by: user593719 on Oct 5, 2010 10:30 AM1) Your inner joins are doing record selections that could be done on the Join's ON clause.
2) Look at your functions to see if you can get performance improvements using parameterized CURSORs & adding DETERMINISTIC to the definition.
3) Consider using WITH to first pull your data & then running your functions.
For example:
with
smiths as (
select *
from hr.per_all_people_f papf
where papf.first_name='Smith'
select *
from smiths
where trunc(sysdate) between effective_start_date and effective_end_date;
In general, pare down your data first. Whatever will restrict your data most, start with selecting that table/view.
Maybe you are looking for
-
How to filter results of mara without writing abap program
I am running SE16 in SAP ECC searchig MARA table. I want to query such As ERSDA > u201801/03/2011u2019 OR LEADA > u201801/302/2011u2019, Through form interface, it seems I can only specify AND for two fields and not OR. Is there a way to specify the
-
Using a file as a source of images for a slideshow in CS6
I was wondering if someone might be able to help me create a slideshow that uses a file to pull images from rather than calling on an individual image source code. As it is right now, I have a basic working jquery slideshow. What I am wanting to get
-
Can we Edit the report At runtime in JSP?
<p>Hi,</p><p> </p><p>Im Using Crystal Report XI server..</p><p> </p><p>I want to edit the report data at runtime through JSP.</p><p>Is there any API available to implement this?</p><p>Please tell me How to Implement this?</p><p> </p><p>-Venkat. </p>
-
Error- isDefault SSL context init failed : Cannot recover key
Hi, We are trying to run a sample HTTPS request from client to Server using SSL. Below is the the code we used to run Client program which will communicate with HTTPS server (Server Socket which will accept connections) Basically we created a server
-
Hello, Currently the system config is: AR00 (discount) = 50 EWT (Tax statistical) - 10% = -5 ( needs to be statistical as per SAP) Total Credit = 50 ( Pricing didnt take EWT ) Pricing copied into Biling and posted correcty into Accounting We wan