HANA DBadvanced

HANA Table Partitioning & Data Aging

Splitting very large HANA tables across partitions for parallelism and manageability, and moving cold data out of hot memory via data aging.

Partitioning and data aging are the topics that come up specifically when an interview probes whether a candidate has dealt with genuinely large-scale HANA tables in production, since these techniques only become necessary (and only make sense to discuss) once table sizes grow well beyond what fits comfortably as a single, unpartitioned in-memory column-store table.

Table partitioning is like splitting one massive filing cabinet into several smaller cabinets organized by year, so a clerk searching for '2026 records' only has to open the one relevant cabinet instead of searching the whole room; data aging is like moving several years of old, rarely-requested files to a basement archive room that's still searchable on request, just a bit slower to retrieve, freeing up prime office real estate (RAM) for this year's actively-used files.

Key Concepts

1
Table partitioning splits one logical table into multiple physical partitions - by hash (evenly distributing rows by a hash of one or more columns, mainly for load-balancing parallel processing across nodes), by range (e.g., splitting by a date or fiscal year range, which is especially useful when queries commonly filter on that same column since the optimizer can prune entire partitions that don't match), or round-robin (simple even distribution without regard to any column value, rarely the best choice for anything but the simplest load-balancing need) - primarily to enable parallel processing across multiple partitions simultaneously and, in a scale-out (multi-host) HANA landscape, to distribute a very large table's data across multiple physical nodes rather than being constrained to fit on one host's memory.
2
Data aging addresses a different, complementary problem: even with unlimited hardware budget, keeping years of rarely-accessed historical transactional data fully loaded in expensive RAM alongside frequently-accessed current data is wasteful, so SAP's data aging framework (built into applications like Finance and Sales & Distribution specifically, not a generic table-level HANA feature you enable arbitrarily) lets historical records beyond a configured aging threshold move to a cold partition state that stays on disk and is only loaded into memory on demand when actually queried, rather than permanently consuming RAM. This differs meaningfully from simple archiving (which physically removes data from the database into an external archive file, requiring a separate retrieval process to read it back) - aged data remains fully queryable in place with standard SQL, just at the cost of a load-on-demand latency penalty for that specific cold partition when it is accessed.
3
A senior-level answer distinguishes the two techniques clearly (partitioning is a physical distribution/parallelism technique applicable broadly to large tables; data aging is an application-aware hot/cold data lifecycle technique built into specific SAP application data models) and notes that partitioning strategy should be chosen based on actual query patterns - range partitioning by a frequently-filtered date column often pays off directly through partition pruning, whereas hash partitioning mainly helps with parallel processing evenness rather than query-time filtering benefit.