CopilotHub
SearchPromptsInstructionsAgentsToolsMCPs
  1. Home
  2. Prompts
  3. Optimize a Slow SQL Query
Back to Prompts

Optimize a Slow SQL Query

Use Copilot to diagnose and optimize a slow SQL query, including index suggestions.

category:database
sql
performance
indexes
0

Prompt

Analyze and optimize this slow SQL query:
  
  [Paste query here]
  
  Tasks:
  - Identify likely bottlenecks.
  - Suggest better indexes or changes to existing ones.
  - Propose a more efficient version of the query if possible.
  - Explain the reasoning in plain language.

Related Prompts

View all →

Full SQL to ORM Migration (Prisma/TypeORM)

Transform raw SQL queries across a codebase into ORM equivalents.

category:modernizationsqlorm+4

Migrate SQL Schema to Prisma Schema

Convert CREATE TABLE SQL into a Prisma schema.prisma file.

category:modernizationprismasql+2

Migrate SQL Query to ORM (Prisma/TypeORM)

Convert raw SQL queries to type-safe ORM operations.

modernizationmigrationsql+3

Investigate a Slow Database Query

Use Copilot to analyze and optimize slow SQL/Prisma queries.

category:databaseperformancesql+2

Add a New Prisma Entity

Use Copilot to define a new Prisma model, migrate, seed, and test it.

category:databaseprismaschema+2

Generate Database Migration Scripts

Have Copilot generate migration scripts for schema changes based on a before/after view.

category:databasemigrationsschema
Browse More Prompts

CopilotHub

A curated collection of prompts, instructions, agents, and tools for AI-powered development.

Quick Links

  • Prompts
  • Instructions
  • Agents
  • Tools
  • MCPs
  • Search

Browse by Category

  • Code Generation
  • Debugging
  • Documentation
  • Refactoring
  • Testing
  • Security

Legal

  • Guidelines
  • About
  • Privacy Policy
  • Terms of Service

Community

GitHub

© 2026 CopilotHub.