473,399 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Question on reorgs

I have a question concerning reorgs.

We have a relatively new DB2 system (8.1) on Aix 5.1 and we are trying
to institute regular reorgs via scripts.

Does it matter if the index for a table or the table itself is
reorganized first?

If the script reorganizes a table then follows that with a reorganize
indexes all for that table is that a problem?

Right now the script issues

db2 -v "reorg table SIEBEL.$i"

followed by

db2 -v "reorg indexes all for table SIEBEL.$i"
I'm wondering if that is a problem.

Thanks in advance.

Nov 12 '05 #1
3 5446
The final phase of offline reorg (what you're using) will rebuild all
indexes from scratch, so the reorg indexes step is not needed.

If you were using online (inplace) reorg, you'd want to reorg the
indexes seperately if your goal is to reclaim space...

da*******@yahoo.com wrote:
I have a question concerning reorgs.

We have a relatively new DB2 system (8.1) on Aix 5.1 and we are trying
to institute regular reorgs via scripts.

Does it matter if the index for a table or the table itself is
reorganized first?

If the script reorganizes a table then follows that with a reorganize
indexes all for that table is that a problem?

Right now the script issues

db2 -v "reorg table SIEBEL.$i"

followed by

db2 -v "reorg indexes all for table SIEBEL.$i"
I'm wondering if that is a problem.

Thanks in advance.

Nov 12 '05 #2
Sean:

If I have a table siebel.S_SRM_REQUEST with a number of associated
indexes.

The table and some of the indexes show in the results of a reorgchk,
that they need a reorg.

I do a db2 -v reorg on that table followed by a runstats, followed by
another reorgchk.
The table no longer shows as needing a reorg but the indexes do..

Nov 12 '05 #3
Look at the structure of the reorg command: db2 ? reorg ..
You do not indicate and therefore I think you are not doing an IN PLACE
reorg.
So, your defaults are allow read and reclaim space.
You do not say you specify an index so I'll assume you do not specify one.

In this case the table is cleaned, the indexes are rebuilt and none of
them will force a sequencing of the rows. So, after reorg, if you
runstats it does not change anything as the indexes will show that they
do not cluster very well.

You would need to specify one and only one index to force the clustering
at reorg time. It would show, after runstats, 100% clustering and
obviously none of the ohers would be expected to. So they would show
that a reorg is indicated.

If you command:
db2 reorg table .... index .... allow read
You get a classic V7 reorg which causes the table to be cleaned and all
indexes to be rebuilt, while read access is allowed on the table.
If you command:
db2 reorg table ... index .... inplace allow (read or write)
You get the able cleaned and sequenced on the index. The indexes are
NOT rebuilt ever, they are updated/maintained. And NO space is reclaimed.
If you command:
db2 reorg table .... NO INDEX SPECIFIED inplace allow (read or write
You get no index rebuild and space reclaimed.

Doing: db2 -v "reorg indexes all for table SIEBEL.$i"
This has nothing to do with reorganizing or rebuilding indexes. All it
does is allows you to specify how your type 2 indexes are going to be
cleaned up or if you want to convert yout type 1 indexes to type 2.

HTH, Pierre.

da*******@yahoo.com wrote:
Sean:

If I have a table siebel.S_SRM_REQUEST with a number of associated
indexes.

The table and some of the indexes show in the results of a reorgchk,
that they need a reorg.

I do a db2 -v reorg on that table followed by a runstats, followed by
another reorgchk.
The table no longer shows as needing a reorg but the indexes do..


--
Pierre Saint-Jacques - Reply to: sescons at attglobal dot net
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc.
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Stevey | last post by:
I have the following XML file... <?xml version="1.0"?> <animals> <animal> <name>Tiger</name> <questions> <question index="0">true</question> <question index="1">true</question> </questions>
7
by: nospam | last post by:
Ok, 3rd or is it the 4th time I have asked this question on Partial Types, so, since it seems to me that Partial Types is still in the design or development stages at Microsoft, I am going to ask...
22
by: jdokos | last post by:
Hello, I have a question about VARCHAR fields. Our application groups here are starting to use VARCHARs much more frequently. Even VARCHAR (2) to (9) length fields. They say this is because...
3
by: Ekqvist Marko | last post by:
Hi, I have one Access database table including questions and answers. Now I need to give answer id automatically to questionID column. But I don't know how it is best (fastest) to do? table...
10
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a...
2
by: datapro01 | last post by:
Running DB2 8.2 on AIX 5.2 I have a question on reorgs and reorgchk results. My reorg script is using the db2reorgchk (which I understand has certain limitations) to determine if a table or an...
3
by: rdudejr | last post by:
Hi all, Ive got a script Ive built which runs reorgs on all tables needing it based on output of reorgchk. The reorgs are ran inline. This past weekend, the reorgs were running against 450...
1
by: daiesy.ember | last post by:
I'm working on implementing online reorgs(V8 FP11 on AIX), and am seeing a lot of transaction logging during the reorgs. My problem is that the archive logs are filling up the active log path...
0
by: mmcsbell | last post by:
What considerations do I need to take for conducting offiline reorgs in and HADR environment? Do I need to stop HADR or will the reorganization take care of both nodes?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...

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.