Re: TRUNCATE Table Command

From: Rennick Sandra <t89003_at_isdserv.dehavilland.ca>
Date: 1995/06/22
Message-ID: <1995Jun22.202437.24146_at_dhnews.dehavilland.ca>#1/1


Lassi.Salo (Lassi.Salo_at_ivo.fi) wrote:
: aaj_at_phantom.telecom.com.au (Tony Jambu) wrote:
: > It is documented in the manuals. If it is causing your hassles, why
: > not just use the REUSE STORAGE option to TRUNCATE?
 

: How come?
 

: I just read the O7 Server SQL Reference,
: and truncate-command chapter (4-396) says:
 

: "dropping and recreating requires you to recreate the table's
: indexes, <...> and respecify its STORAGE parameters,
: while truncating does not."
 

: My opinion is that this SHOULD mean that even if the
: space is deallocated (when using DROP STORAGE), the storage
: parameters of the table should remain intact.
 

: What were the default storage parameters of the tablespace?
 

: Could it be that when the storage parameters of the table
: were also dropped, the defaults of the tablespace were used
: during the import?
 

: ------------------------------------
: Lassi Salo, Dativo Oy, FIN-01019 IVO, FINLAND
: Tel: +358-0-8561 5421
: Fax: +358-0-8561 5328
: Mail: Lassi.Salo_at_ivo.fi
: ------------------------------------

It is also my opinion that the storage parameters of the table remain intact. I did some additional testing after posting this message. I took a table that had a NEXT extent of 10M and altered it to have a NEXT extent of 1M. I then truncated the table with the reuse storage option. Immediately, I examined the table storage definition. The NEXT extent was reset back to 10M again. This is not the default storage definition for the tablespace, and I did not attempt to import any data.

I can only conclude that whatever the definition was at table creation, it will be returned to those values after a TRUNCATE DROP STORAGE command.

Sandra Received on Thu Jun 22 1995 - 00:00:00 CEST

Original text of this message