CtrlK
BlogDocsLog inGet started
Tessl Logo

sql-optimization-patterns

Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.

76

0.98x
Quality

66%

Does it follow best practices?

Impact

93%

0.98x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No known issues

Optimize this skill with Tessl

npx tessl skill review --optimize ./tests/ext_conformance/artifacts/agents-wshobson/developer-essentials/skills/sql-optimization-patterns/SKILL.md
SKILL.md
Quality
Evals
Security

Evaluation results

90%

Optimizing a Slow User Activity Report

N+1 elimination and subquery optimization

Criteria
Without context
With context

No loop queries

100%

100%

Single aggregate query

100%

100%

No correlated subquery

100%

100%

No SELECT *

100%

100%

JOIN-based aggregation

100%

100%

Filter before aggregation

100%

100%

Correct aggregation

100%

100%

CTE or subquery clarity

0%

0%

Notes explain N+1

100%

100%

Notes explain fix

100%

100%

91%

-1%

Designing an Index Strategy for a Content Publishing Platform

Index design and selection strategy

Criteria
Without context
With context

GIN full-text index

100%

100%

GIN JSONB index

100%

100%

Expression index for email

100%

100%

Partial index for published status

100%

100%

Composite index column order

100%

100%

Cursor pagination index

70%

70%

Cursor-based query provided

100%

100%

No leading wildcard LIKE

100%

100%

Index type rationale

100%

100%

Selective indexing awareness

50%

40%

100%

2%

PostgreSQL Performance Audit and Remediation

Performance audit and advanced optimization

Criteria
Without context
With context

pg_stat_statements query

100%

100%

Missing index detection

80%

100%

Unused index detection

100%

100%

Materialized view creation

100%

100%

Concurrent materialized refresh

100%

100%

Batch UPDATE not loop

100%

100%

Temp table for large batch

100%

100%

pg_class approximate count

100%

100%

VACUUM ANALYZE maintenance

100%

100%

Materialized view index

100%

100%

Repository
Dicklesworthstone/pi_agent_rust
Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.