Remove/Truncate the big table

Posted by Valeriy Bashkatov on 03-Feb-2009 00:29

10.1B, 10.1C, 10.2A.

Who knows how to remove the large table from a storage area, in which there are other tables (except truncate area and not by a program method)?

All Replies

Posted by ChUIMonster on 04-Feb-2009 10:46

Sort of like wishing it away?

If the other tables are fairly small in comparison I think that I would consider moving them to another area and then doing a truncate area.

Posted by Valeriy Bashkatov on 05-Feb-2009 01:17

Thank you

Posted by Valeriy Bashkatov on 05-Feb-2009 01:29

But if in area there are many large tables,

which need to be divided. Will use tablemove is problematic, because very long and slowly.

Posted by kevin_saunders on 05-Feb-2009 02:23

Tablemove is not the solution to this issue, especially if the tables are large.

My recommendation is to create the new areas as you want them. Dump a separate .df for each table that is to be moved. Modify the table area and index area information in the .df, as required. Binary dump the table(s). In the Data Dictionary, rename the now dumped table. Load the .df that was previously dumped and then binary load the dumped data.

Once this has been completed for the entire area with the large tables, truncate the area and prostrct remove the data extents.

Of course, this solution expects you have more than enough disk space. The advantage is that you can do it over time as and when you can afford the downtime.

Posted by Valeriy Bashkatov on 06-Feb-2009 00:24

Alas, by the current moment this single correct decision ;(

Thank you, Kevin.

Posted by rstanciu on 06-Feb-2009 04:08

1) Dump the table Customer from DataDictionary and create a file named customer.df

2) open this file and add in the first line:

DROP TABLE "Customer"

3) in bash:

echo "output to load.log. run prodict/load_df.p ('customer.df'). quit." > load_struct.p;

$DLC/bin/_progres -db sports2000 -1 -b -p ./load_struct.p >/dev/null 2>&1;

rm -f ./load_struct.p;

This thread is closed