fix(sqlite): allow 32766 query params - #4810
Conversation
Wasm Query Compiler File Size
|
Merging this PR will not alter performance
Comparing Footnotes
|
✅ WASM query-engine performance won't change substantially (0.998x)Full benchmark reportAfter changes in 82cfce5 |
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Summary by CodeRabbit
WalkthroughUpdates SQLite’s default maximum bind parameter count from 999 to 32766 in 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates Quaint’s SQLite bind-parameter limit to reflect modern SQLite defaults, enabling larger batched queries and reducing unnecessary query chunking in Prisma Engines’ SQL query building layer.
Changes:
- Increase SQLite
max_bind_valuesdefault from999to32766inSqlFamily::default_max_bind_values().
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| pub fn default_max_bind_values(&self) -> usize { | ||
| match self { | ||
| #[cfg(feature = "postgresql")] | ||
| SqlFamily::Postgres => 32766, | ||
| #[cfg(feature = "mysql")] | ||
| SqlFamily::Mysql => 65535, | ||
| #[cfg(feature = "sqlite")] | ||
| SqlFamily::Sqlite => 999, | ||
| SqlFamily::Sqlite => 32766, | ||
| #[cfg(feature = "mssql")] | ||
| SqlFamily::Mssql => 2098, |
Overview
closes https://github.com/prisma/team-orm/issues/1048
Since SQLite 3.32.0, the max bind values were upgraded from 999 to 32766. As of commiting is, we're bundling SQLite 3.41.1.
This will improve performance for all queries that had more than 999 query params.