Skip to main content

Tony — Database Engineer

Tony is CloudThinker’s database expert, specializing in query optimization, performance tuning, backup strategies, and data analytics across SQL and NoSQL platforms.

The Problem Tony Solves

Database performance degrades silently. A missing index on a growing table is invisible until P95 latency spikes and engineers wake up at 2 AM. Connection pool exhaustion looks like an application bug until someone checks the database. Slow queries consume 80% of database CPU while running hundreds of times per day — and nobody knows because there’s no system connecting query analytics to infrastructure cost. Diagnosing and fixing these problems normally requires:
  • Querying pg_stat_statements or enabling MySQL slow query log
  • Reading and interpreting execution plans (EXPLAIN ANALYZE output)
  • Cross-referencing query patterns against current indexes
  • Understanding PostgreSQL/MySQL configuration parameters and their tradeoffs
This is deep specialist work. Most teams don’t have a dedicated DBA, so database performance issues either go unfixed or require expensive consultants.

How Existing Tools Compare

ToolWhat It DoesWhat’s Missing
AWS Performance InsightsVisualizes database load and query waitsAWS RDS only, requires SQL expertise to interpret, no recommendations
pganalyzePostgreSQL query analytics and index recommendationsPostgreSQL-only, no conversational interface, still needs DBA interpretation
Percona Monitoring (PMM)Open-source database monitoringComplex setup, technical dashboards, no AI analysis
Datadog APMApplication + database trace correlationMonitoring only, no fix recommendations, expensive at scale
New Relic / AppDynamicsFull-stack observability including databasesVisibility tool, not a decision-maker; findings still require expert interpretation
Tony goes beyond monitoring: it reads execution plans, understands your schema context, and tells you exactly which index to create, which query to rewrite, and what configuration change to make — in plain language.

How Tony Works

  1. Connects to your databases via read access — pg_stat_statements, MySQL Performance Schema, RDS Performance Insights, Aurora, MongoDB profiler
  2. Identifies slow queries by analyzing execution times, call frequency, and resource consumption — finding the highest-impact targets automatically
  3. Reads execution plans — interprets EXPLAIN ANALYZE output to understand table scans, index misses, and join inefficiencies
  4. Recommends with precision — generates specific CREATE INDEX statements, query rewrites, and configuration changes with before/after impact estimates
  5. Understands tradeoffs — considers write overhead of new indexes, memory implications of configuration changes, and downtime requirements for schema changes

Capabilities

DomainCapabilities
Query OptimizationSQL analysis, execution plans, index recommendations, query rewriting
Performance TuningConnection pooling, configuration optimization, bottleneck identification
Data AnalyticsUsage patterns, trend analysis, capacity planning, metrics visualization
OperationsBackup/recovery, replication, maintenance, disaster recovery planning

Supported Platforms

CategoryPlatforms
RelationalPostgreSQL, MySQL, MariaDB, SQL Server, Oracle
Cloud ManagedAWS RDS, Aurora, Azure SQL, Cloud SQL
NoSQLMongoDB, Redis, DynamoDB, DocumentDB
AnalyticsRedshift, BigQuery, Snowflake

Prompt Patterns

Query Analysis

# Slow query investigation
@tony analyze slow queries on production PostgreSQL

# Specific performance target
@tony identify queries with execution time >2 seconds on orders database

# Execution plan analysis
@tony analyze execution plans for the 20 slowest queries

# Query patterns
@tony find queries that could benefit from caching

Performance Optimization

# Index recommendations
@tony analyze missing indexes that would improve performance by >10%

# Connection optimization
@tony review connection pooling configuration for high-load scenarios

# Configuration tuning
@tony optimize MySQL 8.0 configuration for high-throughput OLTP with 10k connections

# Resource analysis
@tony identify queries consuming >5% of total database CPU

Database Health

# Health check
@tony check database health and performance metrics

# Replication status
@tony assess replication lag and recommend optimization

# Storage analysis
@tony analyze database growth patterns and recommend archiving strategy

# Connection analysis
@tony analyze connection usage patterns and identify connection leaks

Backup & Recovery

# Backup verification
@tony verify backup status and recovery procedures for production databases

# DR planning
@tony create disaster recovery plan with RTO/RPO analysis

# Recovery testing
@tony recommend backup testing strategy for production databases

Tool Usage

ToolTony Use Case
#dashboardQuery latency (P50/P95/P99), connections, I/O, replication lag
#reportPerformance analysis, optimization recommendations, capacity planning
#recommendIndex changes, configuration updates, query rewrites
#alertSlow queries, connection pool exhaustion, replication lag
#chartQuery trends, resource utilization, growth patterns

Examples with Tools

@tony #dashboard database performance metrics for production cluster
@tony #report query performance analysis with optimization plan
@tony #recommend index optimizations prioritized by impact
@tony #alert when P95 query latency exceeds 500ms

Effective Prompts

Include Metrics

# Good
@tony analyze queries with
execution time >2 seconds
running >100 times daily

# Avoid
@tony make database faster

Specify Platform

# Good
@tony optimize MySQL 8.0
for read-heavy workloads
with 10k concurrent connections

# Avoid
@tony check the database

Connection Requirements

Tony requires database connections with performance metrics access:
PlatformRequired Access
PostgreSQLpg_stat_statements, query logs, performance schema
MySQLPerformance Schema, slow query log, status variables
RDS/AuroraEnhanced Monitoring, Performance Insights
MongoDBProfiler, serverStatus, operation logs

Common Workflows

Performance Crisis Response

# Step 1: Identify
@tony identify top 10 slowest queries in last hour

# Step 2: Analyze
@tony analyze execution plans for problematic queries

# Step 3: Optimize
@tony #recommend index changes and query rewrites

# Step 4: Monitor
@tony #dashboard real-time query performance

Proactive Optimization

# Step 1: Baseline
@tony #dashboard current performance metrics

# Step 2: Analyze
@tony identify optimization opportunities across all databases

# Step 3: Prioritize
@tony #recommend optimizations ranked by impact and effort

# Step 4: Automate
@tony #schedule weekly performance review

Capacity Planning

# Step 1: Analyze growth
@tony analyze database growth patterns over last 6 months

# Step 2: Forecast
@tony predict storage and compute needs for next year

# Step 3: Plan
@tony #recommend scaling strategy with cost analysis

What’s Next

PostgreSQL Connection

Connect Tony to your PostgreSQL databases

MySQL Connection

Connect Tony to your MySQL databases

Incident Response

How Tony investigates database-related incidents automatically

Anna

Coordinate Tony with Alex for infrastructure + database cost optimization