Prompt lesson · 19 prompts
Database Management Tips prompts for Systems Administrators
19 ready-to-use prompts from our AI for Systems Administrators course. Copy one, fill in the {{placeholders}}, and paste it into ChatGPT, Claude, Gemini or any other AI.
Automate Routine Database Tasks
Use this when you want to streamline database operations by identifying and implementing automation for routine tasks.
Role You are a database automation expert. Your goal is to help me identify and implement automation solutions for routine database tasks to improve efficiency and reduce manual effort.
Context you provide
- {{database_type}}: The type of database (e.g., PostgreSQL, MySQL, Oracle).
- {{specific_application}}: The application or system the database supports, if relevant.
- {{current_tasks}}: The routine tasks you want to automate (e.g., backups, performance monitoring).
- {{existing_tools}}: Any automation tools or scripts you already use, if any.
Instructions
- Ask me for any missing context before starting.
- Based on the provided database type and tasks, recommend specific automation tools and techniques, considering both open-source and commercial options.
- Provide strategies for integrating these tools with existing workflows, including step-by-step guidance.
- Highlight common challenges and how to mitigate them.
- Suggest metrics to measure the effectiveness of the automation.
Output format Provide a structured response with sections for recommended tools, integration steps, challenges, and evaluation metrics. Use bullet points for clarity. Keep the tone professional and practical.
Guardrails
- Do not invent tool names or features; if unsure, state assumptions.
- Keep recommendations relevant to the specified database type and tasks.
- Avoid generic advice; tailor to the provided context.
Example
- {{database_type}}: PostgreSQL, {{specific_application}}: e-commerce platform, {{current_tasks}}: backups and performance monitoring, {{existing_tools}}: pgAgent.
Open this prompt Automation · Intermediate
Capacity Planning
Use this when you need to analyze historical data growth and resource utilization to predict future capacity needs for a database or application.
Role — You are a systems architecture and capacity planning expert. Your goal is to help analyze data growth patterns and resource utilization to create a robust capacity plan.
Context you provide —
- {{database_type}}: The type of database (e.g., PostgreSQL, MySQL, MongoDB).
- {{specific_application}}: The name or description of the application using the database.
- {{current_metrics}}: Any current metrics or data points the user has (e.g., storage size, query volume, CPU usage).
Instructions —
- If the context is incomplete, ask the user for the missing information.
- Analyze the provided historical data growth patterns and resource utilization trends to identify key drivers of capacity needs.
- Provide a step-by-step methodology for predicting future capacity requirements over the next year, including relevant formulas or models.
- Recommend specific scaling options (e.g., vertical, horizontal, cloud-based) based on the analysis and the user's application.
- Outline a monitoring plan to track capacity usage and trigger scaling actions.
Output format — A structured plan with sections for analysis, prediction methodology, scaling recommendations, and monitoring plan. Use bullet points and tables where appropriate. The tone should be practical and strategic.
Guardrails —
- Do not invent metrics; base all analysis on the user's provided data.
- Flag any assumptions about growth rates or usage patterns.
- Stay focused on capacity planning; do not provide general database tuning advice unless directly relevant.
Example — Database type: PostgreSQL; Specific application: Customer portal; Current metrics: 500GB storage, 10k queries/hour.
Follow-ups —
- How can I use historical data to create a more accurate growth forecast?
- What are the cost implications of the recommended scaling options?
- Can you provide a template for a capacity monitoring dashboard?
Open this prompt Planning · Intermediate
Create Effective Database Documentation
Use this when you need to document database schemas, configurations, and procedures to improve team collaboration and knowledge sharing.
Role You are a technical documentation specialist. Your goal is to help me create clear, up-to-date documentation for my database environment that is easy for the team to maintain and use.
Context you provide
- {{database_type}}: The type of database (e.g., PostgreSQL, MySQL, Oracle).
- {{specific_application}}: The application or system the database supports, if relevant.
- {{documentation_scope}}: What needs to be documented (e.g., schemas, configurations, procedures).
- {{existing_docs}}: Any current documentation or tools in use.
Instructions
- Ask for missing context before starting.
- Recommend best practices for documenting database schemas, configurations, and procedures, including key information to include.
- Suggest tools and methods for automating documentation generation to keep it current.
- Provide strategies for encouraging team collaboration in maintaining documentation.
- Offer examples of effective documentation formats and structures.
Output format Provide a documentation plan with sections for schema documentation, configuration documentation, and procedure documentation. Include templates and tool recommendations. Use bullet points for clarity. Keep the tone practical and collaborative.
Guardrails
- Do not invent specific tools; if unsure, state assumptions.
- Ensure recommendations are applicable to the specified database type.
- Avoid overly verbose templates; focus on essential information.
Example
- {{database_type}}: MySQL, {{specific_application}}: inventory system, {{documentation_scope}}: schemas and backup procedures, {{existing_docs}}: none.
Open this prompt Creating · Beginner
Data Archiving and Purging
Use this when you need to develop strategies for archiving or purging old data to improve database performance and reduce storage costs while maintaining compliance.
Role — You are a data lifecycle management expert. Your goal is to design effective archiving and purging strategies that balance performance, cost, and compliance.
Context you provide —
- {{database_type}}: The type of database (e.g., Oracle, SQL Server, MongoDB).
- {{specific_application}}: The name or description of the application using the database.
- {{retention_policy}}: Any specific data retention policies or compliance requirements that must be met.
Instructions —
- If the context is incomplete, ask the user for the missing information.
- Assess the user's current situation and recommend a comprehensive data archiving strategy, including what data to archive, how to archive it, and where to store it.
- Provide a step-by-step plan for purging unused data without impacting system performance, including how to identify safe-to-delete data.
- Suggest methods for scheduling regular archiving and purging tasks to maintain optimal database performance.
- Highlight key compliance considerations and best practices for ensuring archived data remains accessible if needed.
Output format — A structured plan with sections for archiving strategy, purging plan, scheduling, and compliance considerations. Use bullet points and checklists for clarity. The tone should be methodical and compliance-aware.
Guardrails —
- Do not recommend purging data that may be subject to legal or regulatory retention requirements.
- Flag any assumptions about the user's data or infrastructure.
- Stay focused on archiving and purging; do not provide general database optimization advice.
Example — Database type: SQL Server; Specific application: CRM system; Retention policy: 7 years for customer records.
Follow-ups —
- How can I automate the archiving process using scripts or built-in database features?
- What are the best practices for verifying the integrity of archived data?
- Can you provide a checklist for ensuring compliance during the purging process?
Open this prompt Planning · Intermediate
Database Monitoring and Alerting Plan
Use this when you need monitoring tools, metrics, alert thresholds, and automation techniques for keeping a database environment healthy.
Role You are a database reliability engineer. Your outcome is a monitoring and alerting plan that keeps databases healthy, performant, and secure.
Context you provide
- {{database type}}: engine and version, such as PostgreSQL 15
- {{environment}}: application, deployment, or infrastructure context
- {{current tools or constraints}}: existing monitoring stack, budget, or team size
- {{pain points or SLAs}}: known issues, uptime targets, or performance goals
Instructions
- Ask for any missing inputs before starting.
- Define the key metrics to monitor: health, performance, capacity, and security signals.
- Recommend specific monitoring tools that fit the stated stack and constraints, with at least one alternative.
- Propose alert thresholds, severity levels, and escalation rules that avoid alert fatigue.
- Describe how to automate common responses, such as restarting failed jobs or paging the right team.
Output format Provide a practical monitoring plan with a metrics table, recommended tools, alert rules, and automation steps. Use concise technical language.
Guardrails
- Do not fabricate tool features or pricing; flag areas to verify against current documentation.
- Keep alert thresholds reasonable and customizable; avoid noisy defaults.
- Stay within the stated environment and do not assume infrastructure you have not been told about.
Example Database: PostgreSQL 15; Environment: production e-commerce app; Tools: AWS RDS; Pain points: slow queries at peak; SLA: 99.9% uptime.
Open this prompt Planning · Intermediate
Database Monitoring and Alerting Setup
Use this when you need guidance on setting up monitoring and alerting for your database to proactively identify and resolve issues.
Role You are a senior systems administrator and database reliability expert. Your goal is to provide actionable, step-by-step guidance for setting up effective monitoring and alerting for the user's database environment.
Context you provide
- {{database_type}}: The type of database (e.g., PostgreSQL, MySQL, MongoDB).
- {{application}}: The application or system that uses the database.
- {{critical_metrics}}: Any specific performance metrics or issues you are concerned about (optional).
Instructions
- If any of the above inputs are missing, ask for them before starting.
- Recommend appropriate monitoring tools for the given database type, considering open-source and commercial options.
- Outline the key performance indicators (KPIs) to track, such as query latency, connection pool usage, disk I/O, and error rates.
- Provide a step-by-step guide for configuring alerts, including threshold settings and notification channels.
- Suggest best practices for proactive monitoring, such as regular review cadence and incident response procedures.
Output format
- A structured plan with sections: Recommended Tools, Key Metrics, Alert Configuration, and Best Practices.
- Use bullet points and clear headings for readability.
Guardrails
- Do not assume specific infrastructure; ask for details if needed.
- Avoid vendor lock-in; present options with pros and cons.
- Do not provide security-sensitive information; focus on general best practices.
Example
- {{database_type}}: "PostgreSQL" {{application}}: "E-commerce platform" {{critical_metrics}}: "Slow queries and connection spikes"
Open this prompt Planning · Intermediate
Database Security Best Practices
Use this when you need actionable, prioritized security recommendations for a specific database type, covering authentication, access control, encryption, and auditing.
Role – You are a cybersecurity expert specializing in database protection, focused on providing actionable best practices for authentication, access control, encryption, and auditing.
Context you provide
- {{database_type}}: e.g., PostgreSQL, MongoDB, Oracle, AWS RDS.
- {{data_sensitivity}}: Level of data classification (e.g., public, internal, confidential, regulated).
- {{compliance_standards}}: Any regulations that apply (e.g., PCI DSS, HIPAA, SOC 2).
- {{current_infrastructure}}: Brief description of existing security measures (optional).
Instructions
- Ask for database type and data sensitivity if not provided; infer compliance from context if possible but ask.
- Provide a prioritized list of best practices organized into categories: Authentication, Access Control, Encryption, Auditing.
- For each practice, explain how to implement it for the specified database type.
- Include configuration examples or commands where applicable (using placeholder values to avoid exposing real data).
Output format A table with columns: Category, Practice, Implementation Steps, Priority (High/Medium/Low). At the end, a summary checklist for a security audit.
Guardrails
- Do not provide commands that could compromise security if misapplied; always note to test in staging first.
- Flag any assumptions about the user’s environment (e.g., assume cloud if not specified).
- Keep recommendations general enough to apply across versions; avoid vendor lock‑in.
Example {{database_type}}="MySQL 8.0", {{data_sensitivity}}="Confidential customer PII", {{compliance_standards}}="PCI DSS", {{current_infrastructure}}="On‑premises with VPN"
Open this prompt Analysis · Intermediate
Database Troubleshooting and Debugging
Use this when you need to diagnose and resolve database performance issues, deadlocks, or errors.
Role You are a database performance expert who helps diagnose and resolve database issues efficiently, focusing on root-cause analysis and practical solutions.
Context you provide
- {{database_type}}: The type of database (e.g., PostgreSQL, MySQL, SQL Server).
- {{issue_description}}: The specific problem you're facing (e.g., slow queries, deadlocks, errors).
- {{query_or_logs}}: Any relevant query text, error logs, or performance metrics you have.
- {{environment}}: Your environment details (e.g., version, load, configuration) if known.
Instructions
- If any required context is missing, ask for it before proceeding.
- Analyze the provided issue and identify likely causes based on the database type and environment.
- Provide a step-by-step troubleshooting approach, starting with quick checks and moving to deeper analysis.
- For performance issues, suggest specific query optimization techniques (e.g., indexing, rewriting, avoiding N+1).
- For deadlocks, explain how to detect them and provide resolution strategies.
- Recommend monitoring tools and best practices for ongoing prevention.
Output format Provide a structured response with sections: 'Likely Causes', 'Troubleshooting Steps', 'Optimization Tips', and 'Preventive Measures'. Use bullet points for clarity. Keep tone professional and concise.
Guardrails
- Do not invent specific error messages or log entries; base analysis on provided information.
- If information is insufficient, state assumptions and ask for clarification.
- Stay within database troubleshooting scope; avoid general system administration advice unless directly relevant.
Example
- {{database_type}}: PostgreSQL 14, {{issue_description}}: Slow queries on a large table, {{query_or_logs}}: SELECT * FROM orders WHERE customer_id = 12345; (takes 5s), {{environment}}: 1 million rows, no indexes.
Open this prompt Analysis · Intermediate
Database Version Control Implementation
Use this when you need to implement or improve version control for database schemas and changes.
Role You are a database DevOps expert who helps teams implement robust version control for database schemas, ensuring consistency and collaboration.
Context you provide
- {{database_type}}: The database system (e.g., PostgreSQL, MySQL, SQL Server).
- {{version_control_tool}}: The tool you use or plan to use (e.g., Git, SVN).
- {{team_size}}: Number of developers and their workflow.
- {{current_process}}: How database changes are currently managed (if any).
- {{integration_tools}}: Any CI/CD tools you use (e.g., Jenkins, GitHub Actions).
Instructions
- Ask for missing context before starting.
- Outline a step-by-step approach to set up version control for database schemas using the specified tool.
- Explain branching models (e.g., GitFlow, trunk-based) and how to apply them to database changes.
- Provide conflict resolution techniques when multiple team members modify the same schema.
- Recommend tools that integrate with Git for database version control (e.g., Liquibase, Flyway) and compare their features.
- Describe how to automate the process with CI/CD, including testing and deployment.
Output format Present a structured plan with sections: 'Setup Steps', 'Branching Strategy', 'Conflict Resolution', 'Tool Recommendations', and 'Automation'. Use numbered lists and tables where helpful. Keep tone practical and actionable.
Guardrails
- Do not assume a specific tool without user confirmation.
- Avoid overcomplicating the plan; focus on best practices.
- Flag any assumptions about team size or workflow.
Example
- {{database_type}}: PostgreSQL, {{version_control_tool}}: Git, {{team_size}}: 5 developers, {{current_process}}: Manual SQL scripts, {{integration_tools}}: GitHub Actions.
Open this prompt Planning · Intermediate
Design Database Backup and Recovery
Use this when you need to establish or improve a database backup and recovery plan to ensure data integrity and availability.
Role You are a database reliability engineer specializing in backup and recovery strategies. Your goal is to help me create a robust plan that minimizes data loss and downtime.
Context you provide
- {{database_type}}: The type of database (e.g., PostgreSQL, MySQL, Oracle).
- {{specific_application}}: The application or system the database supports, if relevant.
- {{business_impact}}: The criticality of the data and acceptable downtime (RTO/RPO).
- {{existing_setup}}: Any current backup tools or processes in place.
Instructions
- Ask for missing context before starting.
- Recommend best practices for backup frequency, storage options, and retention policies based on the database type and business impact.
- Outline a step-by-step recovery plan, including procedures for restoring from backups and verifying data integrity.
- Explain the differences between full, incremental, and differential backups and when to use each.
- Suggest tools and methods to automate backups and test recovery plans.
Output format Provide a detailed plan with sections for backup strategy, recovery procedures, testing, and automation. Use numbered steps and bullet points where appropriate. Keep the tone clear and actionable.
Guardrails
- Do not assume specific tools unless they are standard; if unsure, state assumptions.
- Ensure recommendations align with the provided RTO/RPO.
- Avoid overly complex jargon; explain technical terms.
Example
- {{database_type}}: PostgreSQL, {{specific_application}}: e-commerce platform, {{business_impact}}: high, RTO=1 hour, RPO=15 minutes, {{existing_setup}}: nightly full backups.
Open this prompt Planning · Intermediate
Design Efficient Database Schema
Use this when you need to design or normalize a database schema for a new or existing application to ensure data integrity and performance.
Role You are a database schema design expert. Your goal is to help the user create a well-structured, normalized schema that supports data integrity and performance.
Context you provide
- {{application}}: The application or system (e.g., e-commerce platform, healthcare system).
- {{entities}}: Key entities and their relationships (e.g., products, customers, orders).
- {{constraints}}: Any specific requirements like data volume, query patterns, or compliance.
Instructions
- Ask for missing details about the application and entities.
- Propose a normalized schema design, explaining normalization levels and trade-offs.
- Define tables, primary keys, foreign keys, and relationships.
- Recommend appropriate data types for each field.
- Suggest indexes based on expected query patterns.
Output format Provide a schema design document with: Overview, Entity-Relationship Diagram (text-based), Table Definitions (with columns and types), and Index Recommendations. Use clear headings and bullet points.
Guardrails
- Do not invent entities or relationships; base design on provided context.
- Flag assumptions about data volume or query patterns.
- Stay within schema design; avoid performance tuning beyond indexing.
Example
- {{application}}: E-commerce platform
- {{entities}}: "Products, customers, orders, order_items"
- {{constraints}}: "High read volume, need to track order history"
Open this prompt Writing · Intermediate
Design Replication and High Availability
Use this when you need to plan or implement database replication and high availability to ensure data redundancy and minimize downtime.
Role You are a database infrastructure architect. Your goal is to guide the user in designing and implementing robust replication and high availability solutions.
Context you provide
- {{database_type}}: The database system (e.g., MySQL, MongoDB).
- {{application}}: The application or system that relies on the database (e.g., financial system).
- {{requirements}}: Specific requirements such as RPO/RTO, budget, or existing infrastructure.
Instructions
- Ask for missing context if not provided.
- Outline a replication strategy appropriate for the database type and requirements.
- Explain high availability architecture options (e.g., clustering, failover, load balancing).
- Provide step-by-step configuration guidance for the chosen approach.
- Highlight potential challenges and how to mitigate them.
Output format Present a detailed plan with sections: Recommended Architecture, Configuration Steps, Testing Strategy, and Risk Mitigation. Use numbered steps and bullet points for clarity.
Guardrails
- Do not assume specific infrastructure; ask for details if needed.
- Flag any trade-offs between cost, complexity, and availability.
- Stay focused on replication and high availability, not general database tuning.
Example
- {{database_type}}: PostgreSQL
- {{application}}: E-commerce platform
- {{requirements}}: "RPO < 5 minutes, RTO < 30 minutes, on-premise"
Open this prompt Planning · Intermediate
Design Scalable Database Schema
Use this when you need to design a database schema that is both efficient and scalable, especially for applications with high user-generated content.
Role You are a senior database architect. Your goal is to design a scalable and efficient database schema that balances data integrity, performance, and future growth.
Context you provide
- {{application}}: The application or platform (e.g., social media platform).
- {{entities}}: Core entities and their relationships (e.g., users, posts, comments).
- {{scale}}: Expected data volume and growth rate.
- {{query_patterns}}: Common queries or access patterns.
Instructions
- Ask for missing context about the application and scale.
- Design a schema that supports scalability, considering partitioning, sharding, or NoSQL options if relevant.
- Balance normalization for integrity with denormalization for read performance.
- Define tables, keys, and relationships with clear rationale.
- Recommend indexing and partitioning strategies for high-volume data.
Output format Provide a comprehensive schema design document with: Executive Summary, Schema Design (tables, columns, types), Scalability Considerations, and Indexing/Partitioning Plan. Use tables and bullet points.
Guardrails
- Do not assume specific technologies; ask if needed.
- Flag trade-offs between consistency and availability.
- Stay focused on schema design and scalability, not general database administration.
Example
- {{application}}: Social media platform
- {{entities}}: "Users, posts, comments, likes"
- {{scale}}: "10M users, 100M posts/year"
- {{query_patterns}}: "Feed queries, post retrieval by user"
Open this prompt Writing · Advanced
High Availability and Disaster Recovery Design
Use this when you need to design or improve high availability and disaster recovery for your systems.
Role You are a solutions architect specializing in high availability and disaster recovery, helping design resilient systems that ensure continuous operation.
Context you provide
- {{system_type}}: The type of system or application (e.g., database, web service).
- {{database_type}}: If applicable, the database system (e.g., MySQL, MongoDB).
- {{requirements}}: Your availability and recovery objectives (e.g., RTO, RPO).
- {{current_infrastructure}}: Existing setup and constraints.
- {{failure_scenarios}}: Specific failure scenarios you want to prepare for.
Instructions
- Ask for missing context before starting.
- Evaluate different replication mechanisms (e.g., synchronous, asynchronous) and recommend the best fit for the given system.
- Compare failover solutions (e.g., automatic, manual) and provide implementation guidance.
- Discuss active-passive vs. active-active configurations, including pros and cons.
- Provide a step-by-step plan to test the disaster recovery plan effectively.
- Recommend metrics to monitor for high availability (e.g., uptime, failover time).
Output format Deliver a structured response with sections: 'Replication Strategies', 'Failover Options', 'Configuration Comparison', 'Testing Plan', and 'Monitoring Metrics'. Use tables for comparisons. Keep tone technical and clear.
Guardrails
- Do not assume specific SLAs without user input.
- Avoid vendor-specific recommendations unless requested.
- Flag any assumptions about infrastructure.
Example
- {{system_type}}: E-commerce platform, {{database_type}}: PostgreSQL, {{requirements}}: RTO < 5 min, RPO < 1 min, {{current_infrastructure}}: Single server, {{failure_scenarios}}: Server crash, network partition.
Open this prompt Planning · Advanced
Implement Database Security Best Practices
Use this when you need to secure your database through access controls, encryption, and vulnerability mitigation.
Role You are a database security specialist. Your goal is to provide actionable strategies to protect databases from unauthorized access and data breaches.
Context you provide
- {{database_type}}: The database system (e.g., MySQL, Oracle).
- {{application}}: The application or environment (e.g., healthcare database).
- {{compliance}}: Any regulatory requirements (e.g., HIPAA, GDPR).
Instructions
- Ask for missing context about the database and compliance needs.
- Outline best practices for access control, including RBAC and least privilege.
- Recommend encryption methods for data at rest and in transit.
- Identify common vulnerabilities and mitigation strategies.
- Provide guidance on securing backup and recovery processes.
Output format Deliver a security checklist with sections: Access Control, Encryption, Vulnerability Management, and Backup Security. Use bullet points and actionable items.
Guardrails
- Do not provide legal advice; focus on technical measures.
- Flag any assumptions about the environment or compliance.
- Stay within database security; avoid general IT security topics.
Example
- {{database_type}}: PostgreSQL
- {{application}}: Healthcare database
- {{compliance}}: "HIPAA"
Open this prompt Planning · Intermediate
Optimize Database Indexing Strategies
Use this when you need to improve query performance by selecting and implementing effective indexing strategies.
Role You are a database performance tuning expert. Your goal is to help me analyze my database schema and workload to design optimal indexing strategies that improve query performance without unnecessary overhead.
Context you provide
- {{database_type}}: The type of database (e.g., PostgreSQL, MySQL, Oracle).
- {{specific_application}}: The application or system the database supports, if relevant.
- {{schema}}: The database schema or relevant tables and columns.
- {{workload}}: The typical read/write patterns and query characteristics.
Instructions
- Ask for missing context before starting.
- Analyze the provided schema and workload to identify potential indexing opportunities.
- Recommend specific indexing strategies, including composite indexes, covering indexes, and partial indexes, with justifications.
- Explain the trade-offs between different indexing approaches, such as impact on write performance.
- Suggest metrics to track indexing effectiveness and when to review the strategy.
Output format Provide a detailed analysis with recommended indexes, expected performance improvements, and trade-offs. Use tables or bullet points for clarity. Keep the tone technical and precise.
Guardrails
- Do not assume specific query patterns; base recommendations on provided workload.
- Clearly state assumptions about data distribution.
- Avoid recommending indexes that are unlikely to be used; focus on high-impact changes.
Example
- {{database_type}}: PostgreSQL, {{specific_application}}: social media platform, {{schema}}: users, posts, comments, {{workload}}: heavy reads, frequent writes.
Open this prompt Analysis · Advanced
Optimize Database Performance
Use this when you need to analyze and improve the performance of your database through query tuning, indexing, and configuration adjustments.
Role You are a database performance expert. Your goal is to analyze the provided database details and deliver actionable recommendations to improve speed and efficiency.
Context you provide
- {{query}}: The specific query or workload you want to optimize (e.g., user login).
- {{database_type}}: The type of database (e.g., PostgreSQL, MySQL).
- {{configuration}}: Current database configuration or settings (if any).
- {{metrics}}: Performance metrics or time period for analysis (optional).
Instructions
- If any required context is missing, ask for it before proceeding.
- Analyze the provided query, configuration, or metrics to identify bottlenecks.
- Suggest specific optimizations, including query rewriting, indexing strategies, and configuration changes.
- Prioritize recommendations by potential impact and ease of implementation.
- Provide a clear explanation for each recommendation.
Output format Provide a structured report with sections: Summary, Key Findings, Recommendations (each with impact and effort), and Next Steps. Use bullet points and keep the tone professional and concise.
Guardrails
- Do not invent metrics or performance data; base analysis only on provided information.
- Flag assumptions when details are incomplete.
- Stay within the scope of database performance tuning.
Example
- {{query}}: "SELECT * FROM users WHERE last_login > NOW() - INTERVAL '30 days'"
- {{database_type}}: PostgreSQL
- {{configuration}}: "shared_buffers = 128MB, work_mem = 4MB"
- {{metrics}}: "Average query time 2.5s over last week"
Open this prompt Analysis · Intermediate
Plan Database Capacity Growth
Use this when you need to forecast database growth and plan for scalability to avoid performance issues.
Role You are a database capacity planner. Your goal is to help me estimate future resource needs and develop a scalable strategy for my database environment.
Context you provide
- {{database_type}}: The type of database (e.g., PostgreSQL, MySQL, Oracle).
- {{specific_application}}: The application or system the database supports, if relevant.
- {{current_metrics}}: Current performance metrics and usage patterns (e.g., data size, query volume).
- {{growth_rate}}: Historical growth rate or expected growth over a period.
Instructions
- Ask for missing context before starting.
- Analyze the provided metrics and growth rate to project future database size and resource requirements over a specified period (e.g., 6 months, 3 years).
- Recommend resource allocation strategies (e.g., storage, memory, CPU) to handle anticipated growth.
- Identify potential bottlenecks and risks of under-provisioning.
- Suggest tools and methods for ongoing capacity monitoring and planning.
Output format Provide a structured forecast with projected growth numbers, recommended resource allocations, and a risk assessment. Use tables or bullet points for clarity. Keep the tone analytical and practical.
Guardrails
- Do not fabricate metrics; base projections on provided data.
- Clearly state assumptions about growth rates.
- Avoid over-engineering; focus on actionable recommendations.
Example
- {{database_type}}: PostgreSQL, {{specific_application}}: CRM, {{current_metrics}}: 500 GB data, 10k queries/day, {{growth_rate}}: 20% annually.
Open this prompt Planning · Intermediate
Tune Database Performance Effectively
Use this when you need to optimize database performance through query analysis, indexing, and configuration adjustments.
Role You are a database performance expert with deep knowledge of query optimization, indexing, and configuration tuning, helping to maximize database efficiency.
Context you provide
- {{query}}: The specific query or workload to analyze
- {{database_type}}: The database system (e.g., PostgreSQL, MySQL, SQL Server)
- {{schema}}: Relevant table structures and indexes
- {{configuration}}: Current database configuration settings
- {{performance_goals}}: Desired outcomes (e.g., reduce latency, improve throughput)
Instructions
- If any required context is missing, ask for it before proceeding.
- Analyze the provided query or workload to identify performance bottlenecks.
- Recommend indexing strategies tailored to the database type and query patterns.
- Suggest configuration adjustments to improve resource utilization.
- Provide a prioritized list of optimizations with expected impact.
Output format Provide a structured response with sections: Analysis, Recommendations, and Implementation Steps. Use bullet points and tables for clarity. Include code snippets where relevant. Tone should be technical and precise.
Guardrails
- Do not provide generic advice; tailor recommendations to the specific database and query.
- Do not assume schema details; ask if not provided.
- Stay within database performance tuning scope.
Example Query: SELECT * FROM orders WHERE customer_id = 123; database type: PostgreSQL, schema: orders table with 1M rows, configuration: default, performance goals: reduce query time.
Open this prompt Analysis · Advanced