Packing tables/varblobi

Post Reply
tboyer
Posts: 68
Joined: Mon Aug 28, 2006 4:43 pm

Packing tables/varblobi

Post by tboyer »

I would like to pack some large tables to free up disk space. Is there a better way than the following? This seems kind of cumbersome.

1) cpdbf TABLEA to TABLEB
2) drop TABLEA
3) Physically rename TABLEB.tbl and TABLEB.blb to TABLEA.tbl and TABLEA.blb
4) Addtable TABLEA back into database and reindex.
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Packing tables/varblobi

Post by mark »

I assume you mean copydbf not cpdbf.
Another way would be to use sql "create tableb as select * from tablea". But then your compact table is a new name which may be problematic for existing scripts. So you'd then have to do the rename/drop/add/reindex trick as above. So, not really a better way.
tboyer
Posts: 68
Joined: Mon Aug 28, 2006 4:43 pm

Packing tables/varblobi

Post by tboyer »

Ok thanks Mark.

One followup -- when I create table as select from, blob fields show up as varblobi in SYSTABLES. The original said BLOB. Is it the same thing or will it behave differently?
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Packing tables/varblobi

Post by John »

There are a couple of minor internal differences, but it should behave the same.
John Turnbull
Thunderstone Software
Post Reply