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

Home Posts Topics Members FAQ

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 5454
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_RE QUEST 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_RE QUEST 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
5028
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
2653
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 it differently. FOUR QUESTIONS: The background: I got three (3) files
22
11578
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 some of the application programs, specifically Java Beans cannot handle the spaces after the value in CHAR fields. Is anyone else seeing this trend?
3
3076
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 before rowID answID qryrow questionID datafield 1591 12 06e 06e 06e question 1593 12 06f 06f 06f question 1594 12 answer to the question 06f
10
3418
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 database or continue to process on to the next page. I am now trying to learn ASP to see if we can replace some of our applications that were written in php with an ASP alternative. However, after doing many searches on google and reading a couple...
2
1931
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 index needs to be reorged. The presence of an asterisk in the output for the table triggers a reorg of the table using the clustered index if it has one...allow no access. Then runstats
3
5756
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 tables on a database that is about 250 GB in size. The reorgs took all weekend and bled into the week. Ultimately they did not finish. Where should I start looking to speed this up? Thanks rdudejr
1
2891
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 before they can all be archived off to TSM. I don't have unlimited disk space. Is there any way I can estimate the total log space that will be used by an online reorg so I can allocate the right amount of space? I'm also looking into speeding up...
0
1396
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
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,...
0
8823
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8726
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8603
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...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
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();...
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
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.