** Recovering Disk Space: Deleted records in tables **

** Recovering Disk Space: Deleted records in tables **

Post by Larry Fie » Wed, 01 Mar 1995 18:03:05



I've deleted records in several tables but the file sizes have not decreased.  
Is there a way to 'compact' a table to recover this disk space so that only
what is actually used is allocated?

This is in PDOX 4.0 for DOS.  Thanks,

Larry Field - Senior Systems Analyst
Texas A&M University - B/P/P Operations Center
Voice: (409) 862-2763  Fax: (409) 845-7973

 
 
 

** Recovering Disk Space: Deleted records in tables **

Post by Michael By » Thu, 02 Mar 1995 02:55:44




>I've deleted records in several tables but the file sizes have not decreased.  
>Is there a way to 'compact' a table to recover this disk space so that only
>what is actually used is allocated?

>This is in PDOX 4.0 for DOS.  Thanks,

Restructure the table without changing any of the fields.  This will
reclaim the deleted record space.

--
Mike Byrd                    Ex-Fighter Pilot, Research Engineer
Applied Research Laboratories, The University of Texas at Austin

 
 
 

** Recovering Disk Space: Deleted records in tables **

Post by Andrew Benne » Thu, 02 Mar 1995 13:26:19



Quote:>I've deleted records in several tables but the file sizes have not decreased.  
>Is there a way to 'compact' a table to recover this disk space so that only
>what is actually used is allocated?

>This is in PDOX 4.0 for DOS.  Thanks,

Simply restructuring the table will reclaim the disk space relieved by deleted
records.

Andrew
--
 This Usenet post (c) 1995, Andrew Bennett

http://taz.hyperreal.com/~abennett

 
 
 

** Recovering Disk Space: Deleted records in tables **

Post by Nigel Rhe » Thu, 02 Mar 1995 15:05:09



Quote:

> I've deleted records in several tables but the file sizes have not decreased.  
> Is there a way to 'compact' a table to recover this disk space so that only
> what is actually used is allocated?

> This is in PDOX 4.0 for DOS.  Thanks,

Don't know anything about the DOS version, but in Windows you have to select
'Restructure Table', and then select the 'pack' option. This then 'compresses'
the table and other files. I imagine DOS is pretty similar.

--
Nij

 
 
 

** Recovering Disk Space: Deleted records in tables **

Post by Kuo-Sheng (Kas » Sun, 05 Mar 1995 14:55:47


: Nigel Rheam writes in regard to reclaiming disk space from deleted
: records:

: >Don't know anything about the DOS version, but in Windows you have to
: select
: >'Restructure Table', and then select the 'pack' option. This then
: 'compresses'
: >the table and other files. I imagine DOS is pretty similar.

: The Pack option during restructuring only applies to dBase *.DBF tables.
: DBFs don't actually remove records when deleted, they simply flag them.
: Pack physically removes the delete-flagged records.

: Paradox, on the other hand, physically removes records when deleting them.
: That's why you can't undelete records in Paradox as you can in dBase.
: Paradox uses a block scheme for storing records, and until enough records
: are deleted to empty a block, the file size will be unchanged. Don't
: expect the file size to change every time you delete or add a record. You
: might have noticed the file sizes are nice even powers of two?

Actually this is NOT correct.  Paradox DOES keep the blank records, and
PACK is possible (notice the PACK checkbox in restructure?)

: Checking Pack won't hurt anything, but it is ignored if the item is a
: Paradox table.

As stated above, not true at all.

Mike Prestwood mentioned that an undelete function MAY be a future
feature of Paradox in his book.

--
+==========================================================================+

| Pretty good Paradox for Windows Programmer, self-proclaimed Treknologist |
|--------------------------------------------------------------------------|
| Editor of XCOM: The UN-official Strategy Guide  Latest update Feb 1st,95 |
|  get it at Game Domain==> ftp://wcl-l.bham.ac.uk/pub/djh/faqs/x-com.faq  |
+==========================================================================+

 
 
 

** Recovering Disk Space: Deleted records in tables **

Post by phil.t.. » Sat, 04 Mar 1995 08:33:58


 > I've deleted records in several tables but the file sizes have not
 > decreased.  
 > Is there a way to 'compact' a table to recover this disk space so

Greetings Larry;

        Simply Restructure the table(s) in question and you will
        regain the disk space ...

        Good luck!

        Phil Tusa

 
 
 

** Recovering Disk Space: Deleted records in tables **

Post by Peter Hy » Tue, 07 Mar 1995 06:39:40



>The Pack option during restructuring only applies to dBase *.DBF tables.
>DBFs don't actually remove records when deleted, they simply flag them.
>Pack physically removes the delete-flagged records.

>Paradox, on the other hand, physically removes records when deleting them.
>That's why you can't undelete records in Paradox as you can in dBase.
>Paradox uses a block scheme for storing records, and until enough records
>are deleted to empty a block, the file size will be unchanged. Don't
>expect the file size to change every time you delete or add a record. You
>might have noticed the file sizes are nice even powers of two?

>Checking Pack won't hurt anything, but it is ignored if the item is a
>Paradox table.

This is so far at variance from my experience that I have to challenge it:

1. It is true that Paradox deletes are not recoverable.

2. I also believe that the space occupied by deleted records will be
reallocated as needed, so if you are going to add more records, there is no
real need to pack

3. BUT, if I run pack on a Paradox table where records have been deleted
(especially one with memo or image fields) then:
a) It takes a heck of a long time to do *something*
b) I believe the disk space occupied by those deleted records/fields is
freed during the process (and not necessarily at any other arbitrary time as
you imply)

Now I stand open to further evidence on the "I believe" bits above. Perhaps
I have been imagining the way it works rather than checking what I imagined.  
But to me, the concept of packing makes sense for Paradox tables just as (in
a different way) for Dbase tables.

Nowhere, anywhere have I seen a description of the automatic disk space-
recovery to which you refer -- it would take a helluva time to process if it
*did* occur (cf: deleting record 1 of a 50000 record file). And in the
absence of such a mechanism (and even, on occasion when waiting impatiently
for it to "decide" to give back space), you certainly NEED to be able to
pack!

cheers,
peter

--
==============================================================================
     Peter Hyde, South Pacific Information Services Ltd, Christchurch, NZ
                    On the whole, I'd rather be flying...

 
 
 

** Recovering Disk Space: Deleted records in tables **

Post by KevinBlu » Sun, 05 Mar 1995 03:28:51


Nigel Rheam writes in regard to reclaiming disk space from deleted
records:

Quote:>Don't know anything about the DOS version, but in Windows you have to
select
>'Restructure Table', and then select the 'pack' option. This then
'compresses'
>the table and other files. I imagine DOS is pretty similar.

The Pack option during restructuring only applies to dBase *.DBF tables.
DBFs don't actually remove records when deleted, they simply flag them.
Pack physically removes the delete-flagged records.

Paradox, on the other hand, physically removes records when deleting them.
That's why you can't undelete records in Paradox as you can in dBase.
Paradox uses a block scheme for storing records, and until enough records
are deleted to empty a block, the file size will be unchanged. Don't
expect the file size to change every time you delete or add a record. You
might have noticed the file sizes are nice even powers of two?

Checking Pack won't hurt anything, but it is ignored if the item is a
Paradox table.

Kevin J Bluck

 
 
 

** Recovering Disk Space: Deleted records in tables **

Post by Chris Lars » Wed, 08 Mar 1995 03:07:58


: Hello,

: >>Checking Pack won't hurt anything, but it is ignored if the item is a
: >>Paradox table.

: But it take much more time to "restructure" a table when "pack" is checked...

: I can not find anything in the documentation or the help system about the pack check box in the restructure dialog box. What happens with a paradox table when pack is checked?

From the way i read the manual on page 327 (users guide), the pack
option in restructure table only affects dBase tables since these tables
allow you to delete and undelete records. Paradox tables don't allow
undelete and are thus removed immediately.

--
Chris Larsen                    | We learn from history,

System Manager                  |
Struers A/S                     | All opinions expressed herein are my own
                                | and _not_ those of my employers !!.

 
 
 

** Recovering Disk Space: Deleted records in tables **

Post by Peggy Bak » Wed, 08 Mar 1995 04:11:06


Restructure the table (you don't need to change anything in the structure)
 
 
 

** Recovering Disk Space: Deleted records in tables **

Post by KevinBlu » Wed, 08 Mar 1995 06:32:33


Johnny:

I was slightly wrong about the Pack Table option while restructuring
Paradox tables.  Paradox doesn't ignore it.  However, Paradox will
automatically pack a table when it feels it is needed, regardless of
whether you check the box or not.  If you check the box, Paradox goes
through the packing process even if it is not needed.

There are references to Pack Table in the Paradox User's Guide for version
4.5, in the Restructure Paradox Tables and Restructure dBase tables
sections (p.321 and p.327 in my book).

Kevin J. Bluck

 
 
 

1. ** Recovering Disk Space: Deleted records in t

IM> >I've deleted records in several tables but the file sizes have not
IM> >decreased.

IM> >Is there a way to 'compact' a table to recover this disk space so that
IM> >only what is actually used is allocated?

IM> >This is in PDOX 4.0 for DOS.  Thanks,

IM> Restructure the table without changing any of the fields.  This will
IM> reclaim the deleted record space.

Mike is right, Larry.  But here is a handy script called PACK.SC that
I got from somewhere that does this for all tables in a directory.  I
run it once a month!

   ClearAll
   {Tools} {Info} {Inventory} {Tables} {}
   X = nrecords("list")
   Y = 1
   Array C[X]
   Scan
     Moveto [Name]
     Copytoarray B
     C[Y] = B[2]
     Y = Y + 1
   Endscan
   ClearAll
   Y = 1
   While Y <= X
     ClearAll
     {Modify} {Restructure} Typein C[Y]
     Enter
        Echo normal echo off               ; Show progress
     Do_It!
     If MenuChoice() <> "Error" then
       {Convert}                           ; Allow convert
     Endif
     ClearAll
     Y = Y + 1
   Endwhile

---

--
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*  PC-Library TeleComm Systems (612) 895-8775 - 75,000 files - Shopping Mall  *
*  Internet E-Mail & Newsgroups FREE for members - Online interactive Games   *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

2. How can I bound textbox to class property

3. DELETE ROWS - how to recover disk space

4. In-Memory Table Component, Bug in BDE?

5. Deleted records not freeing disk space

6. Newbie Questions About DAO Queries to SQL Server

7. Recovering deleted records from a database table

8. Data type inconsistency (MSSQL linked server with ORACLE DB)

9. URGENT-Recover Log File Disk Space???

10. WAL does not recover gracefully from out-of-disk-space

11. can sqlany recover disk space

12. Disk space - determining free disk space

13. Reclamation of deleted record/table space