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...
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...
MySQL development best practices for schema design, query optimization, and database administration
PostgreSQL development best practices for schema design, query optimization, and database administration
Runs a Base node for production environments. Covers hardware requirements, Reth client setup, networking, and sync troubleshooting. Use when setting up self-hosted RPC infrastructure or running archive nodes. Covers phrases like "run a Base node", "set up Base RPC", "Base node hardware requirements", "Reth Base setup", "sync Base node", "self-host Base", or "run my own node".
Migrate POMWright v1 BasePage page objects to the v1.5 bridge (BasePageV1toV2) as an intermediate step toward v2 PageObject. Use when asked to migrate, convert, or upgrade POMWright page objects from v1 to the bridge, or when working with BasePageV1toV2. Covers: changing class inheritance, translating addSchema/initLocatorSchemas to defineLocators with v2 DSL, updating call-site syntax (getLocator, getNestedLocator, getLocatorSchema), and updating filter/index/update/mutation patterns.
Generate read-only database queries for GregoryAI's PostgreSQL database — Django ORM or raw SQL. Use this skill whenever someone asks to query, count, filter, aggregate, export, or analyse data in the GregoryAI database. This includes questions like "how many articles were added last month", "show me trials by subject", "which sources haven't fetched anything recently", "articles with high ML prediction scores", "list authors with ORCID", or any ad-hoc data exploration against the gregory, subscriptions, or sitesettings models. Also trigger when someone asks for data exports, CSV dumps, or reporting queries. If the question could be answered by querying the database, use this skill.
SQL query optimization patterns including EXPLAIN plan analysis, index strategies, query rewriting, and N+1 query prevention. Use when optimizing slow database queries, analyzing query performance, designing indexes, or debugging database bottlenecks. Works with PostgreSQL, MySQL, SQLite, and other SQL databases. Typical improvements: 10x-1000x query speedup.
Generate and execute ES|QL (Elasticsearch Query Language) queries from natural language and visualize results with Vega-Lite charts. Translates user intent into valid ES|QL queries, executes them against Elasticsearch, and can render professional data visualizations (bar, line, scatter, heatmaps, small multiples, etc.). Use when the user wants to query Elasticsearch data, analyze logs, aggregate metrics, explore data, or create charts and dashboards from ES|QL results.
Work on Madoc TS database migrations and migration tooling. Use when adding SQL migrations, running Slonik migrator, or updating migration paths in services/madoc-ts.
Work on Madoc TS SQL query modules and shared query helpers. Use when adding or modifying queries in services/madoc-ts/src/database/queries or related SQL helper usage.
Use when setting up MongoDB database services in a Pikku app. Covers PikkuMongoDB connection, channel stores, workflow services, secret services, AI storage, agent runs, and deployment services. TRIGGER when: code uses PikkuMongoDB, MongoDBChannelStore, MongoDBWorkflowService, MongoDBSecretService, or user asks about MongoDB setup with Pikku. DO NOT TRIGGER when: user asks about SQL databases (use pikku-kysely) or Redis (use pikku-redis).
Use when setting up SQL database services with Kysely in a Pikku app. Covers @pikku/kysely (base), @pikku/kysely-postgres, @pikku/kysely-mysql, @pikku/kysely-sqlite — channel stores, workflow services, secret services, AI storage, agent runs, and deployment services. TRIGGER when: code uses Kysely, PikkuKysely, KyselyChannelStore, KyselyWorkflowService, KyselySecretService, or user asks about SQL database setup, Postgres/MySQL/SQLite with Pikku. DO NOT TRIGGER when: user asks about MongoDB (use pikku-mongodb) or Redis (use pikku-redis).
Analytics engineering for reliable metrics and BI readiness. Use when building dbt models, defining metrics, or designing analytics layers.
SQL optimization for OLTP systems: EXPLAIN analysis, indexing, schema design, migrations, HA, and security across major SQL platforms.
Run read-only BigQuery SQL queries via CLI. Use when user needs to query BigQuery datasets, run SQL against Google BigQuery, or retrieve data from BigQuery tables.
Create, execute, and roll back versioned database schema migrations using tools like Alembic, Prisma Migrate, Flyway, and Knex.
Creates and modifies PostgreSQL database migrations for xmtpd using golang-migrate. Use when adding or altering tables, columns, indexes, functions, triggers, constraints, or partitions, or when the user mentions migrations or schema changes.
Create, schedule, and verify database backups with support for full, incremental, and point-in-time recovery strategies.
Design normalized database schemas with tables, relationships, indexes, and constraints for any application domain.
Analyze, diagnose, and optimize slow SQL queries using EXPLAIN plans, indexing strategies, query rewriting, and ORM tuning.
Generate optimized SQL queries from natural language requests, supporting SELECT, JOIN, GROUP BY, window functions, CTEs, and subqueries.
Writes and modifies sqlc queries for the xmtpd PostgreSQL database. Use when creating, editing, or reviewing .sql query files in pkg/db/sqlc/, when the user mentions sqlc, database queries, or adding new database operations.