I am working on partitioning a huge table in Sybase. The use case is, the table has grown over the years and the applications do not need data beyond let's say 6 months. So, I need to archive some of the rows. I am exploring the following approach:
- Add date partitioning into table and partition the rows by day
- Write a batch that executes every midnight and archives the partition that is more than 6 months old
Now, in order for me to do this, I need to partition the existing table and have a couple of questions (I am not a Sybase or a DB expert):
- Range partitioning in Sybase comes closest to the approach I am trying to implement. However, it requires you to specify all the ranges upfront. So, if I want to create daily partition on rolling basis for a year, do I need to specify all the values up front?
- Can I
alteran existing table and add partitions or I need to create a new table?