All Research Tracks
R17 · Developer Experience & Tooling

Query Intent Inference for Compatibility Migration

SkeinDB's compatibility telemetry identifies unsupported MySQL features, but knowing a feature is unsupported doesn't help developers migrate. By analyzing query patterns and runtime behavior, SkeinDB infers the intent behind queries and suggests SkeinQL equivalents that preserve intent rather than just syntax — for example, detecting pagination via LIMIT/OFFSET and suggesting native cursor API.

Research Proposal — Mapped to backlog in docs/RESEARCH_BACKLOG.md

🔬 What's Novel

🔧 Technical Approach

Phase 1 — Pattern Library

Catalog common query patterns and their intents: LIMIT/OFFSET pagination, recursive CTEs for hierarchies, COALESCE chains for defaults, EXISTS subqueries for membership testing.

Phase 2 — Pattern Detection

Three detection modes: syntactic matching (single query analysis), sequence matching (multi-query pattern recognition), and dynamic analysis (parameter correlation tracking).

Phase 3 — Intent Mapping

Map detected intents to SkeinQL: pagination → cursor API, hierarchies → graph queries, polling → CDC subscriptions, soft deletes → MVCC time-travel queries.

Phase 4 — Migration Assistant

Interactive assistant presenting detected patterns with suggestions, before/after query comparison, performance estimates, and automatic rewrite for safe transformations.

🧪 Hypotheses

H1

Common application patterns (pagination, hierarchical queries, soft deletes) have recognizable query signatures detectable at the database layer.

H2

Intent-preserving migrations to SkeinQL achieve better performance than syntax-preserving SQL rewrites.

H3

Developers adopt intent-based migration suggestions at higher rates than purely syntactic transformation suggestions.

🔗 SkeinDB Integration

MySQL Compat Layer
Telemetry
SkeinQL RPC
Web Admin
Migration Advisor

📚 Key References