Data stored by fragments.
Posted in 2000
Topics: General Discussion
Hi Informix gurus, One of my developers has a requirement as below : We need to implement following requirement for our application, " TO SPEED UP THE PURGE PROCESS, IT IS SUGGESTED THAT DATA BE STORED BY FRAGMENTS AND THESE ARE TO BE DROPPED WHEN NOT REQUIRED. " Can anyone is the list enlighten me on how to implement this ie, How to store data in fragments and dropping the same fragments later on. thanks in advance, Srini
Let's say you need to roll out data from 6 months prior. Add a month column
and fragment based on it's value. Each month you add a new fragment for the
coming month and after the new data are loaded you drop the oldest fragment:
Create table rolling_data (...
data_month smallint )
FRAGMENT BY EXPRESSION
(data_month = 1) IN dbspace1,
(data_month = 2) IN dbspace2,
(data_month = 3) IN dbspace3,
(data_month = 4) IN dbspace4,
(data_month = 5) IN dbspace5,
(data_month = 6) IN dbspace6,
remainder in extra_dbspace
;
In the seventh month:
ALTER FRAGMENT ON TABLE rolling_data
ADD (data_month = 7) IN dbspace7 AFTER dbspace6;
After loading month 7:
ALTER FRAGMENT DETACH dbspace1 data_month_frag;
DROP table data_month_frag;
Art S. Kagel
Srinivas Sreekumar wrote:
>
> Hi Informix gurus,
>
> One of my developers has a requirement as below :
>
> We need to implement following requirement for our application,
>
> " TO SPEED UP THE PURGE PROCESS, IT IS SUGGESTED THAT DATA BE STORED BY
> FRAGMENTS AND THESE ARE TO BE DROPPED WHEN NOT REQUIRED. "
>
> Can anyone is the list enlighten me on how to implement this ie, How to
> store data in fragments and dropping the same fragments later on.
>
> thanks in advance,
>
> Srini