List:General Discussion« Previous MessageNext Message »
From:Gerd v. Egidy Date:January 9 2002 11:00pm
Subject:accumulating data in a compressed table
View as plain text  

I have two tables, one with a smaller working set of data and one with all 
the historic data; both have exactly the same layout.

I want to run a script about every month which will select the oldest data 
from the working set and move it into a temporary table. Than I want to add 
all data from the temp table to the compressed historic table.

I tried it like this:

[root@intranator statistic]# myisampack -# -v -j historic historic 
myisampack: Can't create/write to file 'historic.MYI' (Errcode: 17)
Aborted: historic is not compressed

User time 0.01, System time 0.00
Maximum resident set size 0, Integral resident set size 0
Non-physical pagefaults 25, Physical pagefaults 165, Swaps 0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 0, Involuntary context switches 0

My plan was to merge the temp table and the historic table - but it looks 
like it doesn't work like this because the table is already there (strace 
shows a file exists error).

If I try it with --force the index of the historic database gets deleted.

Is there any way to accumulate historic data in a compressed table without 
creating another temporary table (wich will this time be at least as big as 
the compressed table)? I want to omit copying the already compressed data 
Creating different tables is also a no-go because mysql doesn't have a union 
command (at least not the stable version) to glue the results back together.

Thank you for your help.


accumulating data in a compressed tableGerd v. Egidy9 Jan