Vitess best practices, query optimization, and connection troubleshooting for PlanetScale Vitess databases. Load when working with Vitess databases, sharding, VSchema configuration, keyspace management, or MySQL scaling issues.
Overall
score
84%
Does it follow best practices?
If you maintain this skill, you can automatically optimize it using the tessl CLI to improve its score:
npx tessl skill review --optimize ./path/to/skillEvaluation — 96%
↑ 1.10xAgent success when using this skill
Validation for skill structure
Vitess is a MySQL-compatible, cloud-native database system originally built at YouTube to scale MySQL. PlanetScale runs Vitess as a managed service. Core capabilities:
| Concept | What it is |
|---|---|
| Keyspace | Logical database mapping to one or more shards. Analogous to a MySQL schema. |
| Shard | A horizontal partition of a keyspace, each backed by a separate MySQL instance. |
| VSchema | Configuration defining how tables map to shards, vindex (sharding) keys, and routing rules. |
| Vindex | Sharding function mapping column values to shards (hash, unicode_loose_xxhash, lookup). |
| VTGate | Stateless proxy that plans and routes queries to the correct shard(s). |
| Online DDL | Non-blocking schema migrations. On PlanetScale, use deploy requests for production changes. |
3306 (direct) or 443 (serverless). SSL always required.Vitess supports nearly all MySQL syntax — most applications work without query changes. Standard DML, DDL, joins, subqueries, CTEs (including recursive CTEs as of v21+), window functions, and common built-in functions all work as expected.
Known limitations:
LOCK TABLES / GET_LOCK: Not supported through VTGate.SELECT ... FOR UPDATE: Works within a single shard; cross-shard locking is not atomic.GROUP BY/ORDER BY/LIMIT merge in VTGate memory. Large result sets can be slow.| Topic | Reference | Use for |
|---|---|---|
| VSchema | references/vschema.md | VSchema design, vindexes, sequences, sharding strategies |
| Schema Changes | references/schema-changes.md | Online DDL, managed migrations, ddl strategies, migration lifecycle |
| VReplication | references/vreplication.md | MoveTables, Reshard, Materialize, VDiff, VStream |
| Architecture | references/architecture.md | VTGate, VTTablet, Topology Service, VTOrc, component interactions |
| Query Serving | references/query-serving.md | Query routing, MySQL compatibility, cross-shard performance, EXPLAIN |
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.