473,657 Members | 2,612 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Running concurrent reorg / runstats on DB2 ESE for Aix V8.2

2 New Member
Hi, I have just taken over as the DBA for a database that has not had any reorgs/runstats run against it for the last three years. As a first step, I have just run reorg/runstats against the system catalog tables & rebound packages.

I next intend to reorg/runstats all the application tables that I have identified as needing this and due to the remote possibility of this causing an adverse affect on performance, it has been decided that I should perform this during an application outage after having first taken a full offline backup in case I should need to backout. (i.e. I don't have the option of running reorgs/runstats while the application is running)

My question is that I have an outage window of 4 hours but reorgs/runstats if run in sequence will take in excess of 10 hours. Is it possible to run reorgs and runstats (against different tables) concurrently ? The tables are not split over nodes - there is just a single node. All the tables reside in one tablespace and all the indexes are in another. Does anyone have any experience of this. I can't find anything in the DB2 for LUW manuals that cover this.

Many thanks, David
Feb 1 '08 #1
4 6009
sakumar9
127 Recognized Expert New Member
ya sure, you can run RUNSTATS in parallel.

-- Regards
Sanjay
Feb 11 '08 #2
docdiesel
297 Recognized Expert Contributor
Hi,

yes, you can run Reorg and Runstats parallel. But another question is resulting from here: Are your tables (or tablespaces) which you want to do reorg on the same or different hard disks?

Running such processes parallel on the same filesystem may slow down everything, depending on the structure of your db, the physical parameters of your storage etc., because in such cases the r/w heads usually will need to do a lot of seeks across your hard disk(s).

Regarding the fact that your db passed years without the aid of an db2 admin, I assume it's not part of a online system with high frequent write actions.You could think about offloading the reorg/runstats to another, similar system (backup/restore of db or tablespaces to similar system, reorg there, backup/restore back) while the main system stays accessable.

Besides, I'm used to nightly online reorgs and runstats actions on my webapp databases, and never experienced any trouble with DB2.

Regards,

Bernd
Feb 11 '08 #3
db2udb
2 New Member
Hi, thanks for your replies.

In answer, I have established that runstats appear to run fine in parallel.
In terms of disks, our database is on a SAN so should be properly striped across many hard disks. Unfortunately, this database (25 GB in size) IS actually an OLTP database !

As regards REORG's, I have found the following SQL useful

select *
from table (SNAPSHOT_TBREO RG ('databasename' , -2) ) as snapshot where reorg_end is null with ur

The columns REORG_PHASE and REORG_CURRENT_C OUNTER have helped me identify when reorgs submitted in parallel seem to be contending, but I have found precious little information as regards this from IBM or on the WWW.

What I have noticed is that if I try to reorg a table by an index using Tempspace, REORG_PHASE 1 (which I believe is the copy of the table to tempspace) seems to be able to run in parallel. However, REORG_PHASE 2 (whatever that is ?!) seems to allow only one reorg to run at a time if they are both defined to use the same tempspace. If they use seperate tempspace, then they seem to run fine in parallel. When a reorg runs without tempspace defined for use, then the reorgs seem to be running in parallel ok. One thing I'm not sure about is that there are sometimes gaps (at the beginning of phase 2 and 3 and especially during phase 4) when the REORG_CURRENT_C OUNTER stays at zero for a long time - not sure if this is contention or not.

Performance is a seperate issue ... these reorgs take 4 hours for the largest tables (35 million rows) and I'm looking to split up tables into seperate tablespaces and to define more than one bufferpool and utilize 8, 16 and 32 k tablespace/bufferpool pages to see how this helps.

Thanks, David
May 22 '08 #4
cburnett
57 New Member
Usually find the following approach works effectively for reorgs:
  1. Turn on Autorunstats
  2. Reorgchk current statistics
  3. Any tables that need reorgs (any *'s) kick off an online table reorg
  4. Use SNAPSHOT_TABREO RG to limit the number of concurrent reorgs (say, 5 max)
  5. For index reorgs, any *'s except the first one
  6. Check their is enough space in the index tablespace for the shadow copy
  7. Before running backups, pause or stop online table reorgs

Autoreorg can only do offline table reorgs which usually isn't very practical fore most customers. With online table reorgs, there can be contention issues with backups hence the need to stop the reorgs.
Jun 1 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2124
by: Prem K Mehrotra | last post by:
I am using db2 version 6 on zos. I am trying to runutility using utilities menu option in spufi. After specifying information on the screen: DB2 UTILITIES "DOWN " is not acti ==> elect from the following: 1 FUNCTION ===> EDITJCL (SUBMIT job, EDITJCL, DISPLAY, TERMINATE 2 JOB ID ===> PMEHROT (A unique job identifier string)
1
4801
by: hikums | last post by:
1. I did a reorgchk, and found that F2 on table and F4 on index indicates a reorg is necessary. 2. Did a reorg. 3. Again I do a reorgchk, the report is the same as in Step 1 4. I do a runstats on all columns and key columns with distribution and indexes all
16
5456
by: andy.standley | last post by:
Hi, we are running DB2 V8.2 (8.1.0.80) on redhat linux and I am trying to set the reorg to be online. I use the control center on the box - db2cc and then configure automatic maintenance wizard - and can get runstats to be online but reorg only offers offline at the activities settings. I have tried to understand why - I thought that online was always offered ? I think that all my indexes are type 2 - I ran some reorg indexes all on the...
4
3316
by: derekbarrett | last post by:
Hi all, Our business is in manufacturing, and we are running SAP on DB2 8.1, planning on upgrading to 8.2.2 within a couple of months. We are running operations 24/7, so are looking for ways to reduce our maintenance impact to our users. Our users hit some specific SAP tables very heavily, and concurrently, so even doing an online REORG causes some system slowdown. We are looking for ways to reduce these slowdown times, because even...
3
5602
by: andy.standley | last post by:
Hi, I posted something a while ago about not being able to setup online reorgs - the db2 control center only offers online runstats. So I started adding tasks to reorg each table. This works fine, but sometimes it does not! The reorg fails and alerts me that it failed. The script is CONNECT TO ECNDB; REORG TABLE AIRLINE.FFMFWB INDEX AIRLINE.FFMFWB_IX1 INPLACE ALLOW WRITE ACCESS START ;
1
1909
by: alex.mcshane | last post by:
Hi - Via the UDB / LUW Control Centre I have tried in vain to identify when a utility was last run. (e.g. Clicking on a given Table) Any idea as to how this information can be retrieved? Thanks
13
4387
by: Yuri | last post by:
We have an update sql that was running OK for several months completing in under 2 minutes . Yesterday something changed and we had to kill this update after it ran more than 6 hours. Update input table contained the normal 100K rows and master table contained about 135 M rows. We reorged the master table specifying the index we wanted DB2 to use in the update, ran runstats and reran the update with the same results (had to cancel it)....
7
3282
by: Okonita via DBMonster.com | last post by:
Hi all, I am very surprised to see that after doing a Reorgchk followed by reorg of selected tables and concluding with a runstats of the reorged tables, all of the tables continue to be identified and selected as reorg candidates in subsequent/followup reorgchk. Has anyone had this experience? Can you share with me what you may have found out to the the reason and if possible what are the possible solutions to correct the situation?
0
1800
by: antonyrajeshi | last post by:
Hi Environment: DB2 v9.5 Workgroup edition on Windows 2003. the tablespaces are in a SAN storage. I am processing about 10 million records in one maintable and about 12 million in another in my database. Data is being gradually added to these tables. There are some SQL procedures that work on these tables and populate other set of tables (some of which could have as many records as these main tables).I have noticed a drastic slowness in the...
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1950
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.