Skip to Main Content
IBM Data and AI Ideas Portal for Customers


This portal is to open public enhancement requests against products and services offered by the IBM Data & AI organization. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:


Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,


Post your ideas

Post ideas and requests to enhance a product or service. Take a look at ideas others have posted and upvote them if they matter to you,

  1. Post an idea

  2. Upvote ideas that matter most to you

  3. Get feedback from the IBM team to refine your idea


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

IBM Employees should enter Ideas at https://ideas.ibm.com


Status Submitted
Workspace Db2
Components Db2 on-premise
Created by Guest
Created on Jun 13, 2025

Automatic Table Partition Creation and Purging Based on Date Expressions

I propose the addition of a native feature in Db2 LUW for automatic table partition management based on a date or timestamp column. Specifically:

Automatic Partition Creation:
Allow users to define partitioning expressions (e.g., daily, monthly, yearly) with forward-looking ranges, such as:

  • For daily partitions, always maintain partitions at least 1 week in advance.
  • For monthly partitions, always maintain at least 3 months in advance.
  • For yearly partitions, maintain at least 2 years in advance.

Automatic Partition Purging:
Allow users to define retention criteria (e.g., KEEP 6 MONTHS, KEEP 2 YEARS), so Db2 can automatically drop (purge) the oldest partitions that fall outside the retention policy.

Declarative Syntax:
Users should be able to define these policies declaratively, either in DDL or via table properties.

Example Use Case:
Similar to the StarRocks table partitioning feature, where partitions are created/dropped dynamically based on a date column and retention policy.

Benefits:

  • Reduces manual intervention for partition management.
  • Prevents data skew and improves query performance by managing partition sizes.
  • Simplifies data lifecycle management and automates compliance with retention policies.
  • Aligns Db2 with modern data warehouse systems that offer dynamic partition management (e.g., StarRocks, ClickHouse, BigQuery).

Additional details (optional):
Example DDL 

CREATE TABLE sales ( id INT, sale_date DATE, amount DECIMAL(10,2) ) PARTITION BY RANGE (sale_date) ( AUTOMATIC ( INTERVAL 1 MONTH PRECREATE 3 MONTHS RETAIN 12 MONTHS ) );

 

Or via ALTER TABLE syntax:

ALTER TABLE sales SET PARTITION POLICY ( INTERVAL 1 MONTH, PRECREATE 3 MONTHS, RETAIN 12 MONTHS );

 

This would greatly enhance automation and data lifecycle management in Db2, especially for time-series and large fact tables.

 

Thanks and Best Regards,

Srinivas Suryadevara

Needed By Not sure -- Just thought it was cool