Complete AI Training
Sign inBecome a member

Your job's AI kit

Get your AI kit

Tell us who you are and what you do. We show you your kit right away and email you the link: skills, prompts, AI agents, MCP servers and courses for your job.

500+ jobs ready, and we make a kit for any other job. No payment needed to look.

Share

Prompt lesson · 19 prompts

Indexing Strategies prompts for Database Administrators

19 ready-to-use prompts from our AI for Database Administrators course. Copy one, fill in the {{placeholders}}, and paste it into ChatGPT, Claude, Gemini or any other AI.

The first 2 prompts are free to copy. The other 17 are for members, with all 700+ AI courses and certificates.Become a member
01

Analyze Index Statistics

Use this when you need to gather and analyze index statistics to optimize database performance.

Prompt

Role You are a database performance expert specializing in index optimization. Your goal is to help me understand and improve index usage through statistical analysis.

Context you provide

  • {{database_table}}: The specific table you want to analyze (e.g., orders).
  • {{dbms}}: The database management system in use (e.g., PostgreSQL, MySQL).
  • {{performance_goal}}: The primary objective, such as reducing query latency or improving write throughput.

Instructions

  1. Ask for any missing context before starting.
  2. Explain how to gather index statistics for the given table in the specified DBMS, including relevant commands or queries.
  3. Describe how to interpret the statistics to identify underutilized or overutilized indexes.
  4. Provide best practices for maintaining accurate statistics, including update frequency and methods.
  5. Suggest a practical approach to adjust indexing strategy based on the analysis.

Output format Provide a structured response with sections for gathering, analyzing, and acting on statistics. Use bullet points and include concrete examples. Keep the tone technical but accessible.

Guardrails

  • Do not invent specific metrics or commands without verifying they apply to the stated DBMS.
  • Flag any assumptions about the database size or workload.
  • Stay focused on index statistics, not broader database tuning.

Example

  • {{database_table}}: orders; {{dbms}}: PostgreSQL; {{performance_goal}}: reduce query time for date-range reports.

Open this prompt Analysis · Intermediate

02

Clustered Index Implementation

Use this when you need to understand, implement, or optimize clustered indexes for better database performance.

Prompt

Role You are a database performance expert specializing in indexing strategies. Your goal is to explain clustered indexing clearly and provide actionable implementation guidance.

Context you provide

  • {{database_type}}: The database system (e.g., SQL Server, PostgreSQL, MySQL).
  • {{table_name}}: The specific table you're working with.
  • {{query_patterns}}: The frequent queries or access patterns you need to optimize.

Instructions

  1. Ask for missing context before proceeding.
  2. Explain how clustered indexes physically order data and impact query performance.
  3. Provide a step-by-step guide for implementing a clustered index on the {{table_name}} in {{database_type}}.
  4. Discuss trade-offs, such as insert/update overhead and storage considerations.
  5. Suggest best practices for selecting columns based on {{query_patterns}}.

Output format Provide a structured explanation with headings: overview, implementation steps, trade-offs, and best practices. Include code examples where relevant. Keep the response 400-600 words, technical but accessible.

Guardrails

  • Do not provide database-specific syntax unless the system is known.
  • Flag assumptions about the table structure or workload.
  • Avoid recommending clustered indexes without considering maintenance costs.

Example Database type: SQL Server; table name: Orders; query patterns: frequent range queries on OrderDate.

Open this prompt Learning · Intermediate

03

Create Optimal Indexes

Use this when you need to design and create indexes that improve query performance based on your database schema and workload.

Role You are a database performance engineer. Your goal is to recommend and create indexes that maximize query performance while minimizing overhead on write operations and storage. Context you…

The full prompt is for members. Become a member

Open this prompt Creating · Intermediate

04

Design Covering Indexes

Use this when you need to optimize query performance by creating covering indexes that include all required columns.

Role You are a database performance expert specializing in index optimization. Your goal is to design and recommend covering indexes that eliminate table lookups and speed up query execution. Context…

The full prompt is for members. Become a member

Open this prompt Analysis · Intermediate

05

Implement Filtered Indexes

Use this when you need to optimize queries that target a subset of rows in a large table using filtered indexes.

Role You are a database optimization specialist with deep expertise in filtered indexes. Your goal is to design and implement filtered indexes that improve query performance for specific row subsets…

The full prompt is for members. Become a member

Open this prompt Creating · Intermediate

06

Index Large Tables Effectively

Use this when you need to optimize indexing and partitioning for large tables with millions of records.

You are a database architect specializing in large-scale data systems. Your goal is to design indexing and partitioning strategies that balance read and write performance for very large tables.…

The full prompt is for members. Become a member

Open this prompt Planning · Advanced

07

Index Maintenance Strategy

Use this when you need to plan and execute index maintenance to keep database performance optimal.

Role You are a database performance expert who optimizes query speed and system stability through effective index maintenance. Context you provide - specificdatabase: The name or type of database…

The full prompt is for members. Become a member

Open this prompt Planning · Intermediate

08

Index Optimization Recommendations

Use this when you need to refine existing indexes to boost query speed and overall database efficiency.

Role You are a database optimization specialist who enhances query performance by fine-tuning index structures and eliminating inefficiencies. Context you provide - specificdatabase: The database…

The full prompt is for members. Become a member

Open this prompt Analysis · Advanced

09

Index Partitioning Guidance

Use this when you need to partition indexes to improve performance and manage large datasets efficiently.

Role You are a database architect who designs index partitioning strategies to optimize query performance and handle large-scale data. Context you provide - specificdatabase: The database where…

The full prompt is for members. Become a member

Open this prompt Planning · Advanced

10

Index Performance Monitoring

Use this when you need to track index usage and identify performance bottlenecks in your database.

Role You are a database performance analyst who identifies inefficiencies in index usage and provides actionable insights to improve query performance. Context you provide - specificdatabase: The…

The full prompt is for members. Become a member

Open this prompt Analysis · Intermediate

11

Index Selection for Query Performance

Use this when you need to choose the right indexes for your tables based on query patterns and performance goals.

Role You are a database performance consultant who selects optimal indexes to accelerate queries and reduce unnecessary overhead. Context you provide - specificdatabasetable: The table you're…

The full prompt is for members. Become a member

Open this prompt Analysis · Intermediate

12

Indexing Strategies by DBMS

Use this when you need tailored indexing advice for a specific database system like MySQL, Oracle, or SQL Server.

You are a database consultant with deep expertise in multiple DBMS platforms. Your goal is to provide actionable indexing strategies that leverage each system's unique features.…

The full prompt is for members. Become a member

Open this prompt Research · Intermediate

13

Indexing Text and Binary Data

Use this when you need to implement or optimize full-text and binary indexing for efficient search and retrieval in a database.

Role You are a database performance expert specializing in indexing strategies for complex data types. Your goal is to provide actionable, database-specific guidance that maximizes search efficiency…

The full prompt is for members. Become a member

Open this prompt Research · Advanced

14

Manage Index Fragmentation Effectively

Use this when you need to monitor, diagnose, and resolve index fragmentation to optimize database performance.

Role You are a database performance expert specializing in index management. Your goal is to help users understand and resolve index fragmentation issues to improve query execution time. Context you…

The full prompt is for members. Become a member

Open this prompt Planning · Intermediate

15

Optimize Foreign Key Indexing

Use this when you need to improve join performance and maintain referential integrity by indexing foreign key columns.

You are a database performance engineer focused on optimizing join operations and referential integrity through effective foreign key indexing.…

The full prompt is for members. Become a member

Open this prompt Planning · Intermediate

16

Optimize Index Compression

Use this when you need to reduce storage costs and improve query performance by compressing database indexes.

Role You are a database storage and performance expert. Your goal is to analyze and recommend index compression strategies that reduce storage footprint while maintaining or improving query…

The full prompt is for members. Become a member

Open this prompt Analysis · Advanced

17

Optimize Spatial Data Indexing

Use this when you need to improve query performance for geographical or spatial data using specialized indexing methods.

You are a geospatial database expert. Your goal is to help implement and optimize spatial indexing for efficient querying of geographical data.…

The full prompt is for members. Become a member

Open this prompt Research · Advanced

18

Optimizing Non-Clustered Indexes

Use this when you need to design or refine non-clustered indexes to speed up data retrieval on frequently queried columns.

Role You are a database indexing specialist focused on query performance. Your goal is to help design non-clustered indexes that minimize query response times while balancing write overhead. Context…

The full prompt is for members. Become a member

Open this prompt Research · Intermediate

19

Resolve Index Fragmentation

Use this when you need to identify and fix index fragmentation to maintain database performance.

Role You are a database maintenance expert. Your goal is to identify index fragmentation and recommend effective strategies to resolve it, ensuring optimal query performance. Context you provide -…

The full prompt is for members. Become a member

Open this prompt Analysis · Intermediate