What problem does it solve?
GORM queries can suffer from suboptimal execution plans, leading to slower performance or incorrect routing in multi‑tenant databases. Without explicit hints, developers cannot guide the database optimizer or force specific indexes.
Core Features & Use Cases
- Optimizer Hints – Direct the database optimizer (e.g., MAX_EXECUTION_TIME, parallel) to control execution behavior.
- Index Hints – Suggest, force, or ignore indexes for SELECT, JOIN, ORDER BY, and GROUP BY clauses.
- Comment Hints – Attach custom SQL comments for routing, debugging, or monitoring purposes.
- Use Cases – Tuning slow queries, enforcing index usage in complex joins, routing read/write traffic in read‑replica setups, and adding traceable comments for observability.
Quick Start
"Add an index hint that forces the idx_user_name index when querying the User model."