473,493 Members | 2,245 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Reorg Table daily?

Hi,

I am looking for some suggestions as to what i can do to improve the
following situation. If there is more detail you require please ask..

There are users inserting/altering data into a table at a good pace.
Since they have been entering in data i have to perform a reorg daily.
Yesterday the reorgchk utility tells me the F2 and F3 table statistics
are out of their thresholds and places an asterisk under columns F2 and
F3. Also formula F4 had an asterisk for 2 of the indexes on the table.
Last night i did a reorg and it completed successfully. This morning
users are again entering data and when i do a runstats and reorgchk
again the F2 column has an asterisk. And 3 of the indexes also have an
asterisk.

If i bump up the amount of free space associated with the table
(PCTFREE) and with the indexes, will this help? The indexes were
created with a parameter of PCTFREE 10.
If this won't help what else can you suggest i try?
Thanks,
C Mitchell

Nov 12 '05 #1
4 2300
if the asterisk always be with you, maybe alter the table append on
will do a little help. that is, reorg is always in need but we optimize
for the insert.

more, is there a cluster index?

Nov 12 '05 #2
What do you mean by alter the table append on?
Yes there is 1 clustered index and that is on the primary key.

Nov 12 '05 #3
"cmitchell" <ch*************@eds.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
Hi,

I am looking for some suggestions as to what i can do to improve the
following situation. If there is more detail you require please ask..

There are users inserting/altering data into a table at a good pace.
Since they have been entering in data i have to perform a reorg daily.
Yesterday the reorgchk utility tells me the F2 and F3 table statistics
are out of their thresholds and places an asterisk under columns F2 and
F3. Also formula F4 had an asterisk for 2 of the indexes on the table.
Last night i did a reorg and it completed successfully. This morning
users are again entering data and when i do a runstats and reorgchk
again the F2 column has an asterisk. And 3 of the indexes also have an
asterisk.

If i bump up the amount of free space associated with the table
(PCTFREE) and with the indexes, will this help? The indexes were
created with a parameter of PCTFREE 10.
If this won't help what else can you suggest i try?
Thanks,
C Mitchell


Increasing PCTFREE will definitely help with indexes (unless an index is the
current timestamp which is always increasing).

For your tables, you need to decide on a clustering sequence (and designate
one index as clustering to determine where the rows will be inserted). If
you do have a clustering index and rows are routinely inserted in the middle
of the table (not always at the end) then increasing PCTFREE may help on
tables also. If PCTFREE is 10 and less than 10% of the table is inserted
weekly, then you only have to reorg weekly.

If you post the DDL for the table and indexes (and provide some explanation
about the table and application if not obvious) I will provide what is
likely the best clustering index to use for the table.
Nov 12 '05 #4
Have you considered making the table an mdc? This should really help
reduce the need for reorg since the data stays clustered based on the
organize by clause.

You can't use organize by for the primary key however. Well, you
could, but you would use one extent per row and waste an amazing amount
of space. You may be able to get away with this if you organize by one
column and the table has a composite key. Never tried this, so I'm not
sure it would work, but I guess it would if the organize by column has
a low cardinality, made unique by the second ( or greater ) column.

Why are you using the primary key for a clustering index? Clustering
makes the most sense when the clustering index is used for range scans.
Most often the pk is used for single row look ups, not range scans.

Adding free space to the table will certainly help.

It's rare that all a tables indexes will all report * free in reorgchk.
It has to do with the cluster being very broken in the data for one
index because the deck is stacked to support the index that is used for
clustering.

Nov 12 '05 #5

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

Similar topics

27
7491
by: Raquel | last post by:
This question if for UDB on LUW. Suppose I take regular database backups of my database Monday: database backup <ts1> Tuesday: Tablespace reorged and imagecopied <ts2> Friday: database...
9
7727
by: Lara | last post by:
Hello freaks, we have many problems with our online reorg and no idea how to resolve it. We had to do an online reorg beacause of 24 h online business. We start the reorg-statements (table by...
2
8274
by: TomHorner | last post by:
I have several quick questions about reorg's, and a request (favor). 1. The documentation says that reorg "Reorganizes an index or a table" I cannot see how one would reorg ONE particular index...
1
4771
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...
16
5408
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 -...
3
5568
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,...
13
4356
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...
2
3816
by: sethwai | last post by:
Hi, I have a nightly script that executes inplace reorgs allow write access for several tables after a previous script does a large number of delete operations. It usually has been executing...
0
2220
by: bwmiller16 | last post by:
Hi All - OSName: AIX NodeName: dr_aixdb01 Version: 5 Release: 3 dr_aixdb01$db2level DB21085I Instance "db2inst1" uses "64" bits and DB2 code release "SQL08027"
0
7119
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
6989
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...
1
6873
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
7367
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...
0
5453
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,...
0
4579
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...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1400
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 ...
1
644
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.