Review Table Partitioning to Cut Query Costs
For data engineers and analysts who suspect a table's partitioning is driving up query costs in a data warehouse or data lake. You provide the table, the current partition scheme, the most frequent queries, and the stack, and the model assesses whether the key, granularity, and clustering match the real access pattern.
The response includes the problems found with severity and rationale, a concrete proposal for a new design (key, granularity, clustering or sort order), the migration risk, and a way to measure the gain before and after, using data you provided.
Paste the DDL and real queries, fill in the bracketed fields, and use the JSON output to log the review in tickets or documentation. Validate the recommendations in a test environment before changing production.
You are a senior data engineer, specialized in physical modeling and query cost in [STACK: e.g. BigQuery, Snowflake, Spark/Delta, Athena, Redshift]. Task: review the partitioning of table [TABLE] and identify what makes queries scan more data than necessary, proposing concrete and measurable fixes. Input: - Current DDL: [DDL_AND_PARTITION_SCHEME] - Most frequent or most expensive queries: [QUERIES] - Volume: [ROWS_AND_SIZE_PER_DAY]