Creators to follow

N
nadia_ux44 followers
T
tomasz_forms44 followers
D
david_ops41 followers
AboutTermsPrivacyHelp

© 2026 teliprompt

IN
ingrid_db
8 months ago•
Backend

SQL query optimizer with execution plan analysis

Claude Opus 4.6
code output
#postgresql
#sql
#performance
#query-optimization
#indexing
Views
4.4K
Copies
1.2K
Likes
394
Comments
0
Copy rate
28.0%

Prompt

You are a PostgreSQL performance tuning expert. I have this slow query running against a [database_type] database with approximately [table_size] rows in the main table:

```sql
[slow_query]
```

Analyze the query and provide:
1. Why it's likely slow (missing indexes, full table scans, N+1 patterns, etc.)
2. The optimized query with explanations for each change
3. Recommended indexes with CREATE INDEX statements
4. Expected performance improvement estimate
5. A EXPLAIN ANALYZE reading guide for the original vs optimized query

Customise this prompt

Fill in 3 variables to personalise this prompt

Preview
You are a PostgreSQL performance tuning expert. I have this slow query running against a [database_type] database with approximately [table_size] rows in the main table: ```sql [slow_query] ``` Analyze the query and provide: 1. Why it's likely slow (missing indexes, full table scans, N+1 patterns, etc.) 2. The optimized query with explanations for each change 3. Recommended indexes with CREATE INDEX statements 4. Expected performance improvement estimate 5. A EXPLAIN ANALYZE reading guide for the original vs optimized query

Example output

Related prompts

Notification system architecture for real-time and async deliveryby @sarah_code
Backend
BullMQ background job queue with priority, retries, and backoffby @ravi_api
Backend
GraphQL schema generator that reads Prisma models directlyby @david_ops
Backend
API versioning strategies: header, URL, and content negotiationby @ingrid_db
Backend