Skip to content

fix(zqlite): skip IS NULL in cursor queries for non-nullable columns#5673

Open
utkarsh-611 wants to merge 1 commit intorocicorp:mainfrom
utkarsh-611:fix/sqlite-cursor-null-or-optimization
Open

fix(zqlite): skip IS NULL in cursor queries for non-nullable columns#5673
utkarsh-611 wants to merge 1 commit intorocicorp:mainfrom
utkarsh-611:fix/sqlite-cursor-null-or-optimization

Conversation

@utkarsh-611
Copy link
Contributor

Cursor pagination queries generate IS NULL checks for non-nullable columns, causing SQLite to abandon its MULTI-INDEX OR optimization and fall back to full table scans.

This is the cursor-pagination counterpart to the getRows fix in #5542 — same SQLite NULL+OR issue, different code path (gatherStartConstraints in query-builder.ts).

Fix: check columnTypes[field].optional and skip IS NULL branches for non-nullable columns.

@vercel
Copy link

vercel bot commented Mar 20, 2026

@utkarsh-611 is attempting to deploy a commit to the Rocicorp Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant