Skip to content

Commit 5006030

Browse files
committed
docs: expand filter pushdown section with in/not_in ops and OR group semantics
- Page-level skip table now covers all 10 supported filter ops - Added section explaining AND vs OR filter group pruning logic - Noted uniform cross-column skip to prevent row misalignment
1 parent d4a1753 commit 5006030

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

docs/src/content/docs/performance.mdx

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,36 @@ Filter: amount > 1000
9595
→ Skip entire page (no R2 read)
9696
```
9797

98-
This is automatic — no configuration needed. Works for `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `between`, `not_between`.
98+
This is automatic — no configuration needed. Supported filter ops:
9999

100-
String columns also have min/max stats (lexicographic). LIKE filters don't benefit from page skip.
100+
| Op | Skip condition |
101+
|----|---------------|
102+
| `eq` | Value outside [min, max] range |
103+
| `neq` | Uniform page (min = max) equals filter value |
104+
| `gt`, `gte`, `lt`, `lte` | Entire range on wrong side of threshold |
105+
| `in` | All IN values outside [min, max] range |
106+
| `not_in` | Uniform page (min = max) appears in NOT IN list |
107+
| `between` | Page range and filter range don't overlap |
108+
| `not_between` | Entire page range inside the excluded range |
109+
110+
String columns also have min/max stats (lexicographic). `like` and `not_like` filters don't benefit from page skip.
111+
112+
### OR filters and page skip
113+
114+
OR filters (`filterGroups`) use different pruning logic than AND filters:
115+
116+
- **AND filters**: a page is skipped if **any single** AND filter eliminates it
117+
- **OR groups**: a page is skipped only if **every** OR group eliminates it
118+
119+
```typescript
120+
// AND: skip if amount > 1000 OR region < 'a' eliminates the page
121+
.filter("amount", "gt", 500).filter("region", "eq", "us")
122+
123+
// OR: both branches must independently eliminate the page to skip it
124+
.where("amount > 1000 OR region = 'us'")
125+
```
126+
127+
Page skip decisions are made uniformly across all columns — the same pages are skipped for every column to avoid row misalignment between columns.
101128

102129
## WASM vs JS execution
103130

0 commit comments

Comments
 (0)