📊 Database Indexing Strategy Advisor

Optimize database performance with this AI prompt, focusing on indexing strategies for enterprise systems.

What this prompt does

  • Analyzes database structures and query patterns to recommend optimal indexing strategies.
  • Evaluates selectivity ratios and designs compound indexes to support multiple query patterns.
  • Provides specific CREATE INDEX statements with detailed justifications for each recommendation.

How to use this prompt

  1. Fill in the [INSERT YOUR TABLE SCHEMAS WITH COLUMN DEFINITIONS], [INSERT YOUR FREQUENTLY EXECUTED QUERIES], [INSERT YOUR READ/WRITE OPERATION PERCENTAGES], [INSERT YOUR CURRENT SLOW QUERIES OR PERFORMANCE ISSUES], and [INSERT YOUR DATABASE SYSTEM - MySQL, PostgreSQL, SQL Server, etc.] placeholder…
  2. Example: "My table schemas include a 'users' table with columns 'id', 'name', 'email', and 'created_at'. My frequently executed queries involve selecting users by 'email' and ordering by 'created_at'. My read/write operation percentages are 80% reads and 20% writes. My current slow queries involv…

Free prompt — copy, paste and run. Part of the Coding prompts collection in the God of Prompt library.

Related Coding prompts