SQL Pro Database Expert
Paste the following prompt into your AI chat to install this skill:
Please install @org-02qudk26/sql-pro-zh by following https://skillhub.cn/install/skillhub.md.
About this skill
Problem
Complex SQL work often fails on specific points: the query is correct but slow, an index makes performance worse, EXPLAIN output is hard to interpret, or OLTP and OLAP workloads interfere with each other. This skill treats those issues together, combining query design, execution plans, indexing strategy, and platform constraints instead of returning isolated syntax.
How it works
- Clarify the goal: define intent, data volume, latency target, and safety constraints.
- Inspect schema and statistics: check table structure, access paths, partitioning, and whether statistics can support a stable plan.
- Optimize and validate: use window functions, recursive CTEs, JOIN strategies, and
EXPLAIN, then test with realistic data. - Support common platforms: useful for
PostgreSQL,Snowflake,BigQuery,Redshift,Aurora,TiDB,CockroachDB, and other cloud-native, HTAP, or warehouse scenarios.
Boundaries
It fits SQL databases where plan information is available; it is not intended for pure ORM guidance, non-SQL or document-only systems, or deep tuning when EXPLAIN and schema details are unavailable. Before running heavy queries in production, use read replicas, limits, or resource isolation.
Use Cases
- Optimize a billion-row analytical query in Snowflake from minutes to an acceptable runtime
- Design a row-level secured database schema for a GDPR-compliant multi-tenant SaaS app
- Build low-latency, per-second real-time dashboard SQL queries
- Plan and validate a migration from Oracle to cloud-native PostgreSQL
Best For
- Backend engineers optimizing slow OLTP queries: want EXPLAIN-driven indexing and query tuning
- Analytics engineers building data warehouses: need cohort, retention, and OLAP queries
- Platform engineers running cloud database migrations: want Oracle to PostgreSQL migration and validation
- SaaS architects designing multi-tenant systems: need row-level security, audit, and compliance
Related Skills
Automatically indexes Gradle-cached AAR/JAR dependency classes and returns library coordinates, versions, and public APIs by fully qualified name, using only the Python standard library.
Codifies AMT and YourMT3 training conventions, script patterns, hyperparameters, precision, checkpoints, and NaN safeguards.
Retrieve relevant chunks from a customer-managed PKM dataset by dataset_id and return concise, source-annotated answers.
Convert PRDs, user stories, or functional specs into prioritized test-point checklists covering functional, business-rule, boundary, exception, and non-functional dimensions.