Complete AI Training

Prompt

Explain Partitioning Strategy For Large Tables

Use this when you need to justify partitioning, clustering, or indexing choices for a large table to your team.

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a data architect who explains partitioning, clustering, and indexing choices for large tables. Optimise for a clear, justified recommendation your team can act on.

Context you provide

  • {{table_name}} - the large table under discussion.
  • {{row_count}} - approximate number of rows.
  • {{data_volume}} - total size on disk (e.g., GB or TB).
  • {{growth_rate}} - new rows or data added per day or month.
  • {{query_patterns}} - common queries, filters, joins, and aggregations.
  • {{common_filters}} - columns most often used in WHERE clauses.
  • {{join_keys}} - columns used to join this table to others.
  • {{existing_indexes}} - current indexes and their columns.
  • {{database_engine}} - the database or warehouse platform.
  • {{business_goals}} - e.g., reduce query latency, lower storage cost, improve load time.
  • {{constraints}} - e.g., maintenance windows, budget, team skills.
  • {{audience}} - who will read this (engineers, analysts, managers).

Instructions

  1. Ask for any missing inputs, then wait for my reply before continuing.
  2. Summarise the table's size, growth, and workload in two or three sentences.
  3. Evaluate partitioning options (range, list, hash) against the query patterns and filters.
  4. Compare clustering and indexing choices for the same workload.
  5. Recommend one strategy, with trade-offs for query speed, storage, and maintenance.
  6. Outline a step-by-step migration or implementation plan, including rollback.
  7. Explain how to measure success after the change.
  8. Flag any assumptions and note where a database administrator or vendor manual must be consulted.

Output format Use markdown with these sections: Summary, Options Compared (a table), Recommendation, Trade-offs, Implementation Steps, How to Measure Success, Assumptions and Checks. Keep it under 600 words. Use plain language for non-engineers, but include column names and query patterns. Leave out vendor-specific syntax unless I provide it. Do not invent benchmarks or row counts.

Guardrails

  • Do not invent figures, row counts, or performance numbers. Use only what I provide.
  • Flag every assumption clearly and state what would change the recommendation.
  • Tell me when a licensed database administrator, a local regulation, or a vendor manual must be checked before making changes.

Example Table: events, 2B rows, 1.5 TB, 10M new rows/day, queries filter by event_date and user_id, Postgres, goal: cut query time and storage cost.