Prompt lesson · 20 prompts
Database Management Insights prompts for IT Specialists
20 ready-to-use prompts from our AI for IT Specialists course. Copy one, fill in the {{placeholders}}, and paste it into ChatGPT, Claude, Gemini or any other AI.
Complex Query Optimization
Use this when you need to optimize slow or inefficient database queries, including rewriting, indexing, or schema changes.
Role You are a database query optimization specialist. Your goal is to help me improve the execution time of complex queries through indexing, rewriting, and schema modifications.
Context you provide
- {{query}}: The exact SQL query that is performing poorly.
- {{database_schema}}: Relevant table structures, indexes, and relationships.
- {{performance_metrics}}: Current execution time and any explain/analyze output if available.
- {{business_requirements}}: Any constraints on query results or data freshness.
Instructions
- Ask for missing context before proceeding.
- Analyze the provided query and schema to identify performance bottlenecks (e.g., full table scans, inefficient joins, missing indexes).
- Recommend indexing strategies, including specific index types and columns.
- Suggest query rewriting techniques, such as using EXISTS instead of IN, avoiding functions in WHERE clauses, or simplifying joins.
- If applicable, propose schema modifications (e.g., denormalization, partitioning) that could improve performance.
- Provide a step-by-step plan for implementing and testing the optimizations.
Output format Deliver a structured optimization report with sections for analysis, recommended indexing, query rewrite suggestions, schema changes, and implementation steps. Use code blocks for SQL examples. Keep the tone technical and precise.
Guardrails
- Do not alter the query's intended results; only optimize for performance.
- Flag any assumptions about the database environment or data distribution.
- Stay within the scope of query optimization; do not provide general database administration advice.
Example
- {{query}}: "SELECT * FROM orders o JOIN customers c ON o.customer_id = c.id WHERE c.country = 'USA' AND o.order_date > '2023-01-01';"
- {{database_schema}}: "orders table has 5 million rows, customers has 1 million rows; indexes on primary keys only."
- {{performance_metrics}}: "Execution time is 8 seconds."
- {{business_requirements}}: "We need results within 2 seconds."
Open this prompt Analysis · Advanced
Data Archiving Strategy
Use this when you need to develop a data archiving policy that balances storage optimization with compliance and access needs.
Role You are a data management strategist specializing in archiving policies. Your goal is to help organizations optimize storage while ensuring data remains accessible and compliant.
Context you provide
- {{data types}} – the kinds of data your organization handles (e.g., customer records, transaction logs).
- {{access patterns}} – how often data is accessed and by whom.
- {{compliance requirements}} – any legal or regulatory retention rules that apply.
- {{storage constraints}} – current storage costs, capacity limits, or performance issues.
Instructions
- Ask for any missing context before starting.
- Based on the provided data types and access patterns, categorize data into tiers (e.g., hot, warm, cold) and recommend which data should be archived.
- For each tier, suggest an appropriate archiving method (e.g., cloud storage, tape, or database partitioning) and justify your choice.
- Outline a policy that includes retention periods, access procedures, and deletion rules, ensuring compliance with the stated requirements.
- Provide a step-by-step implementation plan, including any necessary tools or automation.
Output format Provide a structured report with sections: Executive Summary, Data Classification, Archiving Methods, Policy Recommendations, and Implementation Plan. Use clear headings and bullet points. Tone: professional and actionable.
Guardrails
- Do not invent specific compliance laws; ask for them if not provided.
- Flag any assumptions about data sensitivity or business impact.
- Stay within the scope of archiving; do not advise on broader data governance unless asked.
Example Data types: customer records, transaction logs; access patterns: daily for recent, rarely for older than 2 years; compliance: GDPR; storage: on-premise with high costs.
Open this prompt Planning · Intermediate
Data Governance Framework
Use this when you need to establish or improve data governance, including ownership, quality, and accountability.
Open this prompt Planning · Intermediate
Data Migration Planning
Use this when you need to plan a database migration, including compatibility, downtime, and data integrity.
Open this prompt Planning · Intermediate
Data Replication Strategy
Use this when you need to design a data replication strategy for availability, performance, or disaster recovery.
Open this prompt Planning · Intermediate
Data Usage Analysis
Use this when you need to analyze database usage patterns to optimize storage and retrieval performance.
Open this prompt Analysis · Intermediate
Database Capacity Planning
Use this when you need to forecast database growth and plan upgrades to ensure optimal performance.
Open this prompt Planning · Intermediate
Database Migration Strategy
Use this when you need expert guidance on migrating a database with minimal downtime and risk.
Open this prompt Planning · Advanced
Database Monitoring and Alerting Setup
Use this when you need to establish proactive monitoring and alerting for your database to detect issues early.
Open this prompt Planning · Intermediate
Database Performance Analysis
Use this when you need to analyze database performance metrics and identify bottlenecks or optimization opportunities.
Open this prompt Analysis · Intermediate
Database Performance Optimization
Use this when you need to improve database performance through indexing, query tuning, and efficiency analysis.
Open this prompt Analysis · Intermediate
Database Replication and Sync
Use this when you need to set up or manage database replication and synchronization to ensure data consistency across instances.
Open this prompt Planning · Advanced
Database Security Auditing
Use this when you need to identify and address security vulnerabilities in your database, such as weak access controls, unencrypted data, or suspicious activities.
Open this prompt Analysis · Advanced
Database Troubleshooting and Error Resolution
Use this when you need to diagnose and resolve database issues such as connectivity problems, error messages, or performance bottlenecks.
Open this prompt Analysis · Intermediate
Develop Robust Backup and Recovery Plan
Use this when you need expert guidance on implementing backup and recovery strategies for critical systems.
Open this prompt Planning · Intermediate
Disaster Recovery Plan Development
Use this when you need to create or refine a disaster recovery plan for your IT infrastructure.
Open this prompt Planning · Intermediate
Ensure Database Compliance with Regulations
Use this when you need to understand and implement regulatory compliance controls (e.g., GDPR, HIPAA) in your database management system.
Open this prompt Planning · Intermediate
Manage Automated Backup and Recovery
Use this when you need step-by-step assistance with setting up, verifying, and improving automated backup and recovery processes.
Open this prompt Automation · Advanced
Optimize Storage with Data Archiving and Purging
Use this when you need to archive or purge outdated data to optimize database storage and improve system performance.
Open this prompt Planning · Intermediate
Scalability and Capacity Planning
Use this when you need to plan for database growth, predict future capacity needs, and recommend scaling strategies.
Open this prompt Planning · Intermediate