Unix Technical Forum

Performance-related Issues on a Restored DB

This is a discussion on Performance-related Issues on a Restored DB within the DB2 forums, part of the Database Server Software category; --> We observed an interesting phenomenon that is driving us crazy. We have an archive process that takes rows off ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 03:47 AM
esmith2112
 
Posts: n/a
Default Performance-related Issues on a Restored DB

We observed an interesting phenomenon that is driving us crazy. We have
an archive process that takes rows off of a primary database, then
inserts them into a history database. After loading the exported rows
into the history database, we observed abysmal performance (queries
increasing from 2 minutes to 2 hours). No amount of runstats or
explaining/tuning queries yielded anything significant.

In an effort to study the problem on a different server so we wouldn't
kill the primary server with these long-running queries, we took a
backup and restored it onto the new server. It was a similarly classed
machine. Much to our surprise, the problem didn't exist on the new
server. We looked at all the differences in the configurations and
never found anything significant.

For grins, we decided to restore the same database back to itself on
the primary server, and again, we were were surprised to see our
problem go away.

We just completed a new archive cycle and the problem has resurfaced. I
have two questions:
1. Does a restore do an implicit reorg of the tables? (I had always
thought that it just copied the data pages verbatim and reloaded them
in the same order.)
2. Why does the load create such chaos? Doesn't it allocate data on
contiguous new pages appended to the end? (We don't delete anything on
target DB, so there shouldn't be any "holes" in the data pages...)


Any enlightenment on this issue would be greatly appreciated.
Platform = UDB 7.2 FP 12 on AIX 5.2

Thanks,
Evan

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 03:50 AM
Pierre Saint-Jacques
 
Posts: n/a
Default Re: Performance-related Issues on a Restored DB

As to point 1)
No, there is no reorg during restore. DB2 puts the table in the proper
tablespaces(containers) and the pages of the table where they belong
located in the proper extents. There is no attempt to reorh, reclaim
space, restructure anything of your data.

As to point 2)
Do you collect stats (STATISTICS YES) when you do the loads?
It will allocate continuous pages of an extent in DMS or in SMS if you
have set db2empfa. In SMS , and no empfa (your db cfg has a parm that
induicates if it is set for the db) the you'll get whatever "contoguity"
the file system decides.
If it is reallly as you describe, set db2empfa if SMS and alter the
target tables to be APPEND ON, then load with statistics yes.
Test and hopefully the problem disappers. If not, we'd need a little
more info as to the sequence of events as well as some parms setting.
HTYH' Pierre.
PS: If appls. are running from boud applications a rebind may noy huirt
after stats.!

esmith2112 wrote:
> We observed an interesting phenomenon that is driving us crazy. We have
> an archive process that takes rows off of a primary database, then
> inserts them into a history database. After loading the exported rows
> into the history database, we observed abysmal performance (queries
> increasing from 2 minutes to 2 hours). No amount of runstats or
> explaining/tuning queries yielded anything significant.
>
> In an effort to study the problem on a different server so we wouldn't
> kill the primary server with these long-running queries, we took a
> backup and restored it onto the new server. It was a similarly classed
> machine. Much to our surprise, the problem didn't exist on the new
> server. We looked at all the differences in the configurations and
> never found anything significant.
>
> For grins, we decided to restore the same database back to itself on
> the primary server, and again, we were were surprised to see our
> problem go away.
>
> We just completed a new archive cycle and the problem has resurfaced. I
> have two questions:
> 1. Does a restore do an implicit reorg of the tables? (I had always
> thought that it just copied the data pages verbatim and reloaded them
> in the same order.)
> 2. Why does the load create such chaos? Doesn't it allocate data on
> contiguous new pages appended to the end? (We don't delete anything on
> target DB, so there shouldn't be any "holes" in the data pages...)
>
>
> Any enlightenment on this issue would be greatly appreciated.
> Platform = UDB 7.2 FP 12 on AIX 5.2
>
> Thanks,
> Evan
>


--
Pierre Saint-Jacques - Reply to: sescons at attglobal dot net
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc.
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
Forum Jump


All times are GMT. The time now is 08:52 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com