otmfaqForumsBlogsRegister
FAQMembers ListCalendarToday's PostsSearch


 Subscribe Blogs:RSS
 Subscribe Forums:RSS
OTMFAQ Home
OTMFAQ Blogs
OTMFAQ Forums
OTMFAQ Tutorials

OTM SIG
MavenWire


Installation and Upgrades Getting past the first step - installing and upgrading OTM / G-Log.

Tags: , ,

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old June 7th, 2007, 00:32
Junior Member
 
Join Date: Jun 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 0
CDrozdowski is on a distinguished road
V4.5 Update and Migration Question Part 1

Hi Chris,
I have indentified 3 bottlenecks in our v4.5 upgrade/migration process. Here is the first.

Background: We have performed two test upgrade/migrations on non production databases.

Bottleneck 1: preupdate 38940 from dbupdate_45.sql

FROM the dbupdate_45.sql script log:

Test DB 1 MONITOR_AGENT table: 19 Million Records

START of preupdate38940 07:41:34 (editted some input here....)

Pop of MONITOR_AGENT.IS_TOLERANCE_RULE_ACTIVE for value 'N'…...4 Hr 52 Mi 19 Sec

END of preupdate38940 Elapsed Time: 4 Hr 56 Mi 8 Sec


Test DB 2 MONITOR_AGENT table: 8.5 Million Records

START of preupdate38940 22:38:29 (editted for size...)

Pop of MONITOR_AGENT.IS_TOLERANCE_RULE_ACTIVE for value 'N'.........2 Hr 3 Mi 12 Sec


END of preupdate38940 Elapsed Time: 2 Hr 5 Mi 36 Sec


SLEUTHWORK:


FROM create_dbupdate_45.sql

PROCEDURE preupdate38940 IS
BEGIN
ALTER_TABLE.ADD_COLUMN('MONITOR_AGENT','CONTEXT_SA VED_QUERY_GID','VARCHAR2(101)');
ALTER_TABLE.ADD_COLUMN('MONITOR_AGENT','TOLERANCE_ RULE_GID','VARCHAR2(101)');
-- ALTER_TABLE.ADD_COLUMN('MONITOR_AGENT','IS_TOLERAN CE_RULE_ACTIVE','VARCHAR2(1) DEFAULT ''N'' NOT NULL');
ALTER_TABLE.ADD_COLUMN('MONITOR_AGENT','IS_TOLERAN CE_RULE_ACTIVE','VARCHAR2(1)');
ALTER_TABLE.POP_AND_NOTNULL('MONITOR_AGENT','IS_TO LERANCE_RULE_ACTIVE','''N''');
ALTER_TABLE.MODIFY_COLUMN('MONITOR_AGENT','IS_TOLE RANCE_RULE_ACTIVE','DEFAULT ''N'' NOT NULL');


ALTER_TABLE.ADD_COLUMN('MONITOR_PROFILE_DELETED',' MONITOR_PROFILE_TEMPLATE_GID','VARCHAR2(101)');
ALTER_TABLE.ADD_COLUMN('SAVED_QUERY','IS_HIDDEN_FO R_MILESTONES','VARCHAR2(1) DEFAULT ''N''');
END preupdate38940;


I traced this to the procedure POP which is called by POP_AND_NOTNULL that is part of the ALTER_TABLE package.

PROCEDURE pop (p_table varchar2, p_column varchar2, p_value varchar2, p_where_clause VARCHAR2 DEFAULT NULL,
P_COMMIT_RATE INTEGER DEFAULT 3000) is
sql_statement varchar2(5000);
tmp_tab varchar2(100);
start_time DATE;
end_time DATE;
begin
start_time := SYSDATE;
tmp_tab := create_rowid_table (p_table,p_where_clause);
sql_statement :=
'DECLARE '||
' CURSOR C1 IS SELECT ROW_ID FROM '||tmp_tab||';'||
' BEGIN '||
' FOR C1_REC IN C1 LOOP'||
' UPDATE '||p_table||
' SET '||p_column||' = '||P_VALUE||
' WHERE ROWID = C1_REC.ROW_ID; '||
' GLOG_UTIL.COMMIT_IT(c1%rowcount, '||p_commit_rate||');'||
' END LOOP; '||
' COMMIT; '||
' END;';
execute immediate sql_statement;
drop_rowid_table(p_table);
end_time := SYSDATE;
print_time(start_time,end_time,'Pop of '||p_table||'.'||p_column||' for value '||p_value);
exception
when others then
glog_util.print_it(sql_statement);
glog_util.print_it(SQLERRM);
raise;
END pop;

DISCUSSION:
I understand the design and intent of the ALTER_TABLE package...
I think the issue for us is the extremely large table volume in the MONITOR_AGENT table (8.5 and 19 million in test respectively, 10.5 million in production)

I think we would get better performance is we could increase the value for commit count so that we were committing less frequently but bigger batches... the default is 3000.

One problem I see is that POP is called in POP_AND_SETNULL and there is not way to pass a commit count parameter..

Do you have any ideas or suggestions,
thanks !
catharine
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old June 7th, 2007, 20:25
chrisplough's Avatar
Site Moderator
 
Join Date: Jun 2006
Location: West Chester, PA
Posts: 821
Blog Entries: 7
Thanks: 53
Thanked 201 Times in 121 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 10
chrisplough has a spectacular aura aboutchrisplough has a spectacular aura aboutchrisplough has a spectacular aura about
Send a message via AIM to chrisplough
Re: V4.5 Update and Migration Question Part 1

Catharine,

You've hit exactly on the main issues that our other clients are experiencing while preparing to migration from older OTM versions (4.0,4.5). There's a multi-pronged approach that we normally take to bring these migration windows down into something more acceptable:
  1. Purge as much data as possible. Many clients don't have a data retention policy and the OTM databases get out of control. This improves all-around performance as well as migration times.
  2. Ensure that your DB is running as efficiently as possible, both from a hardware perspective and an Oracle DB tuning perspective. For instance, our new Linux servers with fast disk arrays run many of these intensive scripts over twice as fast as HP-UX, Solaris and AIX boxes from only a year ago. We've also removed indexes in the past and re-created them post-migration in order to speed up the process.
  3. Tune the migration scripts, just as you've suggested.
So - directly to your point, great work in tracking this down to the pop procedure! I definitely agree that increasing the commit count is a great way to decrease the processing time. While I'm not familiar with this procedure directly, I can't see any reason that altering the procedure, if only for the duration of the migration, wouldn't help significantly. I can't think of anything in the migration process that would be adversely affected by this - as long as you have enough rollback and temp space available.

Are you at the point where you can give this a try and report back your results?

Thanks!
--Chris
__________________
Chris Plough
MavenWire

www.MavenWire.com

Last edited by chrisplough : June 7th, 2007 at 20:33.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old June 7th, 2007, 20:33
chrisplough's Avatar
Site Moderator
 
Join Date: Jun 2006
Location: West Chester, PA
Posts: 821
Blog Entries: 7
Thanks: 53
Thanked 201 Times in 121 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 10
chrisplough has a spectacular aura aboutchrisplough has a spectacular aura aboutchrisplough has a spectacular aura about
Send a message via AIM to chrisplough
Re: V4.5 Update and Migration Question Part 1

I'm sure you know this, but I just tracked down the ALTER_TABLE package to the following script:

<otm_install_dir>/glog/oracle/script8/create_alter_table_package.sql

Which in turn calls:

<otm_install_dir>/glog/oracle/script8/pkg/alter_table.pks
<otm_install_dir>/glog/oracle/script8/pkg/alter_table.pkb

So by editing the alter_table.pkb file and re-running the create_alter_table_package.sql script, you should be able to define a different default commit rate.

--Chris
__________________
Chris Plough
MavenWire

www.MavenWire.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about voucher baji Integration and Data Mapping 2 January 22nd, 2008 15:37
Optimizing GC3 v5.0 Performance - Part 1 chrisplough Performance, Scalability and HA 6 August 30th, 2007 19:57
V4.5 Migration/Upgrade Part 3 CDrozdowski Installation and Upgrades 1 June 7th, 2007 20:40
V45 Update/Migration Questions Part 2 CDrozdowski Installation and Upgrades 1 June 7th, 2007 20:28
[SOLVED] Re: newbie question Alan Cuartero Email List Archive 1 December 12th, 2006 02:46



All times are GMT. The time now is 21:16.
Copyright © 2008, Open Book Solutions LLC. All rights reserved.

Sponsored by MavenWire - MavenWire.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37