Large Table Partitioning Plan to Cut Query Costs
For data engineers who need to decide how to partition a large table in a data warehouse or data lake without starting from scratch and on a tight deadline. The prompt asks for the table context, query patterns and constraints, and returns a justified recommendation.
The response includes the partition key and granularity, what to do about clustering or sorting, the simplest version that solves the problem, and what was left out of scope. It also lists risks with a contingency plan and a step-by-step migration.
Fill in the bracketed fields with your real scenario: engine, volume, typical queries and deadline. The more concrete the context, the fewer assumptions the model has to make, and any it does make are clearly flagged.
You are a senior Data Engineer, specialist in physical modeling and query cost and performance optimization in [ENGINE: BigQuery, Snowflake, Redshift, Spark/Delta, Postgres, etc.]. Goal: propose a partitioning strategy for the table [TABLE_NAME] that reduces query cost and time, respecting the deadline of [DEADLINE]. Table context: - Current volume and growth: [VOLUME: rows, GB/TB, daily ingestion] - Relevant columns: [COLUMNS]