473,394 Members | 1,765 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,394 software developers and data experts.

REORG TABLE INPLACE - what is NOTRUNCATE TABLE for?

aj
DB2 LUW v8.2 FP 14 RHAS 2.1

I'm confused about the NOTRUNCATE TABLE option of the REORG TABLE
INPLACE command. In my mind, truncating the table means that you
delete all rows that it has - why would you not use this option
as part of the reorg? If you want to truncate, why not just
delete the table and recreate it w/ DDL?

I deleted a great many rows from a wide table yesterday, then did
an online/inplace REORG against it, using the NOTRUNCATE TABLE
option. To my surprise, no pages were freed up in the tablespace.
Is this because I used the NOTRUNCATE option?

Yes, I have RTFM - but all it says about the option is "Do not
truncate the table after inplace reorganization. During truncation,
the table is S-locked."

Any explanation appreciated...

aj
Mar 16 '07 #1
2 6072
Lew
I believe the no truncate option does exactly what you saw. It
doesn't free up the empty pages for reuse by another object in the
tablespace. Those pages may be empty but they are reserved for the
object you reorged.

On Mar 16, 9:18 am, aj <ron...@mcdonalds.comwrote:
DB2 LUW v8.2 FP 14 RHAS 2.1

I'm confused about the NOTRUNCATE TABLE option of the REORG TABLE
INPLACE command. In my mind, truncating the table means that you
delete all rows that it has - why would you not use this option
as part of the reorg? If you want to truncate, why not just
delete the table and recreate it w/ DDL?

I deleted a great many rows from a wide table yesterday, then did
an online/inplace REORG against it, using the NOTRUNCATE TABLE
option. To my surprise, no pages were freed up in the tablespace.
Is this because I used the NOTRUNCATE option?

Yes, I have RTFM - but all it says about the option is "Do not
truncate the table after inplace reorganization. During truncation,
the table is S-locked."

Any explanation appreciated...

aj
Mar 16 '07 #2
Ian
aj wrote:
Yes, I have RTFM - but all it says about the option is "Do not
truncate the table after inplace reorganization. During truncation,
the table is S-locked."
As the manual says, during the truncation the table is S-locked, which
means that it is read only.

This read-only phase may not be desirable in certain situations, which
is why you can eliminate it with the NOTRUNCATE TABLE option.
Mar 18 '07 #3

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

Similar topics

11
by: randi_clausen | last post by:
Using SQL against a DB2 table the 'with' key word is used to dynamically create a temporary table with an SQL statement that is retained for the duration of that SQL statement. What is the...
5
by: aboycalled3 | last post by:
I'm interested in using the fascinating CSS available at http://www.moronicbajebus.com/playground/cssplay/reformat-table/ which allows one to present tabular data in a way that's more appealing...
4
by: Laphan | last post by:
Hi All Wonder if you could help, I have a bog standard table called STOCKPRICES that has served me well for a while, but now I need to change the structure of it and because a number of users...
2
by: G.W. Lucas | last post by:
I apologize if this is a RTFM question, but I have not been able to find a definitive answer elsewhere. Does a "REINDEX TABLE" lock the table while it is working? Can applications write data to...
3
by: Selden McCabe | last post by:
Sometimes I want to put a table inside a cell of another table (say, to create 3 equal divisions, etc.). When I want the inner table's edges to correspond exactly with the edges of the cell, I set...
1
by: donet programmer | last post by:
I have a requirement where I need to create a dataset that consists of a table inside a table ( a child table inside a parent table). I am not really familiar with the data relations and not sure...
1
by: lcourchesne | last post by:
Hi there, This is what I am trying to do: Create a query that will insert a column from Table 2 into Table 1. These two tables are exactly the same in structure, however, there is no unique...
3
by: Alvin SIU | last post by:
Hi all, I am using DB2 in AIX. I have a master table and a txn table. The master table has many many records. Each month, there is a new txn table.
1
oranoos3000
by: oranoos3000 | last post by:
hi I have a table with large height and inside of this large table i have only one table with small height in show small height table is shown in middle of space of large table and have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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...

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.