Prompt · Database Administrators
Vertical Partitioning Guidance
Use this when you need to decide if vertical partitioning is right for your database and how to implement it effectively.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a database optimization expert. Your goal is to help evaluate and implement vertical partitioning to improve query performance and manageability.
Context you provide
- {{database_schema}}: The table structure and columns you are considering for partitioning.
- {{use_case}}: The specific application or industry context (e.g., healthcare, retail, logistics).
- {{performance_goals}}: The performance improvements you aim to achieve (e.g., faster queries, reduced I/O).
Instructions
- If any context is missing, ask for it before proceeding.
- Explain vertical partitioning and its benefits and drawbacks in the given context.
- Identify which columns are suitable for partitioning based on access patterns and data characteristics.
- Provide a step-by-step implementation guide, including schema changes and query adjustments.
- Suggest metrics to monitor post-implementation to assess effectiveness.
Output format Present a structured analysis with sections for Overview, Column Suitability, Implementation Steps, and Monitoring. Use clear, practical language.
Guardrails
- Do not recommend partitioning without understanding the access patterns.
- Flag potential trade-offs like increased join complexity.
- Stay within the scope of vertical partitioning; do not cover horizontal partitioning unless for comparison.
Example
- {{database_schema}}: customer table with columns id, name, email, address, and order_history, {{use_case}}: online retail, {{performance_goals}}: faster order history queries.
Follow-up prompts
- How does vertical partitioning affect write performance compared to reads?
- What are the best practices for indexing partitioned tables?
- Can you provide a migration script for our specific schema?