Thread: Delay in WHILE LOOP


Permlink Replies: 14 - Pages: 1 - Last Post: Jul 5, 2007 1:15 PM Last Post By: ManoharAdusumilli
ManoharAdusumilli

Posts: 55
Registered: 01/04/07
Delay in WHILE LOOP
Posted: Jun 8, 2007 2:32 PM
Click to report abuse...   Click to reply to this thread Reply
Hello all,

We are running a set of Mappings in a process flow. We have small table with 6 values which drives a WHILE LOOP inside the process flow. All goes well expect we see considerable delay between each iteration. We found it by the results we get from the process flow. Can anyone help us eliminate this duration between each iteration to increase the performance?

Thanks,
Manohar
jdijcks

Posts: 1,087
Registered: 01/10/01
Re: Delay in WHILE LOOP
Posted: Jun 12, 2007 5:39 PM   in response to: ManoharAdusumilli in response to: ManoharAdusumilli
Click to report abuse...   Click to reply to this thread Reply
Hi Manohar,

Where did you see the delay, is it in fetching from the table in the while loop and setting the variable? Can you describe the process flow so we could have a look at this?

JP
gillesp

Posts: 182
Registered: 02/18/05
Re: Delay in WHILE LOOP
Posted: Jun 12, 2007 11:26 PM   in response to: ManoharAdusumilli in response to: ManoharAdusumilli
Click to report abuse...   Click to reply to this thread Reply
Hello Manohar,

We had a similar problem with a proces flow. We saw a lot of wait time between the end time of one mapping and starting the next mapping in a proces flow. Our enterprise manager adviced us to add an index on WB_RT_NOTIFY_QUEUE_TAB.

We used dbms_stat.unlock to make it possible to analyze this table and stopped the runtime service to create the index.

After creating the index and gathering stats the wait time between to mappings has gone down significantly.

Hope this helps!

Gilles
ManoharAdusumilli

Posts: 55
Registered: 01/04/07
Re: Delay in WHILE LOOP
Posted: Jun 13, 2007 6:05 AM   in response to: gillesp in response to: gillesp
Click to report abuse...   Click to reply to this thread Reply
Hi Gilles,

I would try what you guys did.
Do we have to lock the stats on WB_RT_NOTIFY_QUEUE_TAB back once we analyze?

Thanks
Manohar
ManoharAdusumilli

Posts: 55
Registered: 01/04/07
Re: Delay in WHILE LOOP
Posted: Jun 13, 2007 6:11 AM   in response to: jdijcks in response to: jdijcks
Click to report abuse...   Click to reply to this thread Reply
Hi JP,

No there is no delay for fetching the table for the variable. The table has 11 rows and I never see that query taking time.

Our process flow has set of mappings which are executed in parallel. We used FORK activity to enable running multiple mappings in parallel. From FORK you connect to several mappings and all mappings outgoing transaction goes to AND activity. AND activity ensures all mappings are finished and then we connect to transformation which updates the loop counter. When we run the mappings in parallel, OWB opens multiple connections (as many as mappings) and executes.

I can see all connections in EM come as ACTIVE and finish in few seconds. It takes 2-3 minutes to execute for the next variable (next set) in loop. It doesn't have any ACTIVE SQL going on meanwhile.

Let me know if you need any clarifications.

Thanks for your help
Manohar
ManoharAdusumilli

Posts: 55
Registered: 01/04/07
Re: Delay in WHILE LOOP
Posted: Jun 13, 2007 6:33 AM   in response to: ManoharAdusumilli in response to: ManoharAdusumilli
Click to report abuse...   Click to reply to this thread Reply
Hi Gilles,

I did exactly what you mentioned without any luck. Same delay.

I feel there is too much written in the log file OWB.<number> under $OWB_HOME/owb/log directory. Does anyone of you know where can we can turn off excessive logging?

Manohar
ManoharAdusumilli

Posts: 55
Registered: 01/04/07
Re: Delay in WHILE LOOP
Posted: Jun 15, 2007 8:28 AM   in response to: ManoharAdusumilli in response to: ManoharAdusumilli
Click to report abuse...   Click to reply to this thread Reply
Hi Gilles,

I take it back ... our process flow is now running good. For some reason it took few hours to pick up and running fine. Can you please share any techinque to keep it like this? Are you aware of any scripts to purge audit data. I used the one provided with s/w under $ORACLE_HOME/owb/rtp/sql which gets hung often even if I give the date range to 1 day.

Thanks
Manohar
dallan

Posts: 1,195
Registered: 01/10/01
Re: Delay in WHILE LOOP
Posted: Jun 15, 2007 9:31 AM   in response to: ManoharAdusumilli in response to: ManoharAdusumilli
Click to report abuse...   Click to reply to this thread Reply
Gilles
Can you reply with some info on ...
What index did you add on this table? How many rows are in the table? Many maps in flow/ how many flows? How often are you running them...

Cheers
David
gillesp

Posts: 182
Registered: 02/18/05
Re: Delay in WHILE LOOP
Posted: Jun 17, 2007 11:37 PM   in response to: dallan in response to: dallan
Click to report abuse...   Click to reply to this thread Reply
David,

The index we created is:
CREATE INDEX OWBRUN_P.IDX$$_53C50001 ON OWBRUN_P.WB_RT_NOTIFY_QUEUE_TAB
(Q_NAME, CORRID, STATE)
LOGGING
TABLESPACE OWBREP_IDX_P
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
NOPARALLEL;

The number of rows in the table is: 1.5 million

We do a daily run, we've got a parent proces flow wich calls 6 proces flows that execute approximately 800 mappings.

Hope this helps!
ManoharAdusumilli

Posts: 55
Registered: 01/04/07
Re: Delay in WHILE LOOP
Posted: Jun 18, 2007 5:51 AM   in response to: gillesp in response to: gillesp
Click to report abuse...   Click to reply to this thread Reply
Hi Gilles,

I see an existing index on columns Q_NAME,STATE,PRIORITY,CHAIN_NO,LOCAL_ORDER_NO. So you created that additional index you mentioned?
Our process picked up speed once I anlyzed this table. Can we see more improvement when we create the additional INDEX you mentioned?

Thanks
Manohar
gillesp

Posts: 182
Registered: 02/18/05
Re: Delay in WHILE LOOP
Posted: Jun 18, 2007 5:59 AM   in response to: ManoharAdusumilli in response to: ManoharAdusumilli
Click to report abuse...   Click to reply to this thread Reply
Hi Manohar,

I'm not sure you will gain an extra boost in performance.

The first thing we did was both. Analyzing the table and adding the index and then we saw improvements in performance. Later we dropped the index and we saw a drawback (is that a correct word in this syntax) in perfomance. Then we added the index again and performance improved again.

One weird thing is that we have two similar environments (QA and Production) with a lot more rows in the QUE_TAB table n production then QA, but QA has been running longer and more often.

Do you have a clue about that?

Cheers,
Gilles
ManoharAdusumilli

Posts: 55
Registered: 01/04/07
Re: Delay in WHILE LOOP
Posted: Jun 18, 2007 6:55 AM   in response to: gillesp in response to: gillesp
Click to report abuse...   Click to reply to this thread Reply
Hi Gilles,

Does QA & Prod reside on same hardware? If not are they similar in all aspects? If every thing is same then I have no idea but would try removing audit data and purge work flow activity by using the procedure wf_purge.move_to_history.

All the Best,
Manohar
gillesp

Posts: 182
Registered: 02/18/05
Re: Delay in WHILE LOOP
Posted: Jun 18, 2007 6:59 AM   in response to: ManoharAdusumilli in response to: ManoharAdusumilli
Click to report abuse...   Click to reply to this thread Reply
They reside on the same hardware, in the same database and are exactly the same.I'll give it a go with purging the audit data!

Thanks,
Gilles
ManoharAdusumilli

Posts: 55
Registered: 01/04/07
Re: Delay in WHILE LOOP
Posted: Jul 5, 2007 1:12 PM   in response to: gillesp in response to: gillesp
Click to report abuse...   Click to reply to this thread Reply
Hello All,

I got more info on the issue. I got a script for Support to truncate all the audit tables:

The following is the truncate_audit_execution_tables.sql script. Save to a file and execute
as per the example. It is a good idea to performa database level schema export
of the repository owner/runtime owner before running this.

==================================================================
REM sqlplus <RT_OWNER>/<RT_PASSWORD>@<RT_CONNECT>
@truncate_audit_execution_tables.sql
REM
REM to truncate wb_rt_audit_executions and dependent audit tables in the runti
me repository

set echo off
set verify off

rem 'truncate_audit_execution_tables : begin'

alter table wb_rt_feedback disable constraint fk_rtfb_rta;
truncate table wb_rt_feedback;
rem 'wb_rt_feedback truncated'

alter table wb_rt_error_sources disable constraint fk_rts_rta;
truncate table wb_rt_error_sources;
rem 'wb_rt_error_sources truncated'

alter table wb_rt_error_rows disable constraint fk_rtr_rte;
truncate table wb_rt_error_rows;
rem 'wb_rt_error_rows truncated'

alter table wb_rt_errors disable constraint fk_rter_rta;
alter table wb_rt_errors disable constraint fk_rter_rtm;
truncate table wb_rt_errors;
rem 'wb_rt_errors truncated'

alter table wb_rt_audit_struct disable constraint fk_rtt_rtd;
truncate table wb_rt_audit_struct;
rem 'wb_rt_audit_struct truncated'

alter table wb_rt_audit_detail disable constraint fk_rtd_rta;
truncate table wb_rt_audit_detail;
rem 'wb_rt_audit_detail truncated'

alter table wb_rt_audit_amounts disable constraint fk_rtam_rta;
truncate table wb_rt_audit_amounts;
rem 'wb_rt_audit_amounts truncated'

alter table wb_rt_operator disable constraint fk_rto_rta;
truncate table wb_rt_operator;
rem 'wb_rt_operator truncated'

alter table wb_rt_audit disable constraint fk_rta_rte;
truncate table wb_rt_audit;
rem 'wb_rt_audit truncated'

alter table wb_rt_audit_parameters disable constraint ap_fk_ae;
truncate table wb_rt_audit_parameters;
rem 'wb_rt_audit_parameters truncated'

alter table wb_rt_audit_messages disable constraint am_fk_ae;
delete from wb_rt_audit_messages where audit_execution_id is not null;
rem 'wb_rt_audit_messages deleted'
rem 'wb_rt_audit_message_lines cascade deleted'
rem 'wb_rt_audit_message_parameters cascade deleted'

alter table wb_rt_audit_files disable constraint af_fk_ae;
delete from wb_rt_audit_files where audit_execution_id is not null;
rem 'wb_rt_audit_files deleted'

truncate table wb_rt_audit_executions;
rem 'wb_rt_audit_executions truncated'

alter table wb_rt_feedback enable constraint fk_rtfb_rta;
alter table wb_rt_error_sources enable constraint fk_rts_rta;
alter table wb_rt_error_rows enable constraint fk_rtr_rte;
alter table wb_rt_errors enable constraint fk_rter_rta;
alter table wb_rt_errors enable constraint fk_rter_rtm;
alter table wb_rt_audit_struct enable constraint fk_rtt_rtd;
alter table wb_rt_audit_detail enable constraint fk_rtd_rta;
alter table wb_rt_audit_amounts enable constraint fk_rtam_rta;
alter table wb_rt_operator enable constraint fk_rto_rta;
alter table wb_rt_audit enable constraint fk_rta_rte;
alter table wb_rt_audit_parameters enable constraint ap_fk_ae;
alter table wb_rt_audit_messages enable constraint am_fk_ae;
alter table wb_rt_audit_files enable constraint af_fk_ae;

rem 'truncate_audit_execution_tables : end'

commit;
--

ManoharAdusumilli

Posts: 55
Registered: 01/04/07
Re: Delay in WHILE LOOP
Posted: Jul 5, 2007 1:15 PM   in response to: ManoharAdusumilli in response to: ManoharAdusumilli
Click to report abuse...   Click to reply to this thread Reply
The truncate script above doesn't remove data from WB_RT_NOTIFY_QUEUE_TAB, the one Gilles referred above. For that Support gave the following info:

"WB_RT_NOTIFY_QUEUE_TAB is the queue table used to send notification messages to clients and is not
touched by
wb_rt_api_purge.purge_deployment. Normally, I'd expect rows in this to be removed by clients receiving notification messages.

Messages can be manually purged from this table if necessary. It should be possible to delete record
s from this table that have got an ENQ_TIME of greater than 7 days ago.

I have raised bug 5899763."

You can delete all of the records where the ENQ_TIME is over seven days ago.

Good Luck,
Manohar
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums