Skip to content

Conversation

@grgbkr
Copy link
Contributor

@grgbkr grgbkr commented Nov 7, 2025

No description provided.

@vercel
Copy link

vercel bot commented Nov 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
replicache-docs Ready Ready Preview Comment Nov 10, 2025 5:33pm
zbugs Error Error Nov 10, 2025 5:33pm

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

🐰 Bencher Report

Branchgrgbkr/partition-fetch
Testbedself-hosted

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Lower Boundary
(Limit %)
src/client/zero.bench.ts > pk compare > pk = NThroughput
operations / second (ops/s) x 1e3
📈 plot
🚷 threshold
🚨 alert (🔔)
38.61 ops/s x 1e3
(-12.18%)Baseline: 43.96 ops/s x 1e3
39.35 ops/s x 1e3
(101.93%)

Click to view all benchmark results
BenchmarkThroughputBenchmark Result
operations / second (ops/s) x 1e3
(Result Δ%)
Lower Boundary
operations / second (ops/s) x 1e3
(Limit %)
src/client/custom.bench.ts > big schema📈 view plot
🚷 view threshold
826.45 ops/s x 1e3
(-0.87%)Baseline: 833.67 ops/s x 1e3
605.68 ops/s x 1e3
(73.29%)
src/client/zero.bench.ts > basics > All 1000 rows x 10 columns (numbers)📈 view plot
🚷 view threshold
3.00 ops/s x 1e3
(+4.58%)Baseline: 2.86 ops/s x 1e3
2.64 ops/s x 1e3
(88.13%)
src/client/zero.bench.ts > pk compare > pk = N📈 view plot
🚷 view threshold
🚨 view alert (🔔)
38.61 ops/s x 1e3
(-12.18%)Baseline: 43.96 ops/s x 1e3
39.35 ops/s x 1e3
(101.93%)

src/client/zero.bench.ts > with filter > Lower rows 500 x 10 columns (numbers)📈 view plot
🚷 view threshold
4.20 ops/s x 1e3
(+0.94%)Baseline: 4.16 ops/s x 1e3
3.82 ops/s x 1e3
(90.80%)
🐰 View full continuous benchmarking report in Bencher

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

🐰 Bencher Report

Branchgrgbkr/partition-fetch
Testbedself-hosted

🚨 3 Alerts

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Lower Boundary
(Limit %)
unplanned: track.exists(playlists)Throughput
operations / second (ops/s)
📈 plot
🚷 threshold
🚨 alert (🔔)
5.41 ops/s
(-12.70%)Baseline: 6.20 ops/s
5.74 ops/s
(105.96%)

zql: all playlistsThroughput
operations / second (ops/s)
📈 plot
🚷 threshold
🚨 alert (🔔)
2.68 ops/s
(-37.67%)Baseline: 4.30 ops/s
3.62 ops/s
(135.16%)

zqlite: all playlistsThroughput
operations / second (ops/s)
📈 plot
🚷 threshold
🚨 alert (🔔)
1.15 ops/s
(-18.74%)Baseline: 1.42 ops/s
1.26 ops/s
(109.51%)

Click to view all benchmark results
BenchmarkThroughputBenchmark Result
operations / second (ops/s)
(Result Δ%)
Lower Boundary
operations / second (ops/s)
(Limit %)
1 exists: track.exists(album)📈 view plot
🚷 view threshold
14,643.63 ops/s
(+0.05%)Baseline: 14,636.89 ops/s
13,311.89 ops/s
(90.91%)
2 exists (AND): track.exists(album).exists(genre)📈 view plot
🚷 view threshold
5,590.59 ops/s
(+1.01%)Baseline: 5,534.91 ops/s
5,054.25 ops/s
(90.41%)
3 exists (AND)📈 view plot
🚷 view threshold
2,172.22 ops/s
(+1.16%)Baseline: 2,147.32 ops/s
1,957.44 ops/s
(90.11%)
3 exists (OR)📈 view plot
🚷 view threshold
1,092.67 ops/s
(+0.51%)Baseline: 1,087.11 ops/s
988.09 ops/s
(90.43%)
5 exists (AND)📈 view plot
🚷 view threshold
340.40 ops/s
(-0.55%)Baseline: 342.28 ops/s
311.30 ops/s
(91.45%)
5 exists (OR)📈 view plot
🚷 view threshold
180.06 ops/s
(+0.11%)Baseline: 179.86 ops/s
162.80 ops/s
(90.41%)
Nested 2 levels: track > album > artist📈 view plot
🚷 view threshold
4,798.54 ops/s
(-0.06%)Baseline: 4,801.21 ops/s
4,373.69 ops/s
(91.15%)
Nested 4 levels: playlist > tracks > album > artist📈 view plot
🚷 view threshold
784.94 ops/s
(-1.43%)Baseline: 796.29 ops/s
718.88 ops/s
(91.58%)
Nested with filters: track > album > artist (filtered)📈 view plot
🚷 view threshold
3,983.45 ops/s
(-1.19%)Baseline: 4,031.59 ops/s
3,692.42 ops/s
(92.69%)
planned: playlist.exists(tracks)📈 view plot
🚷 view threshold
907.23 ops/s
(-3.04%)Baseline: 935.70 ops/s
854.72 ops/s
(94.21%)
planned: track.exists(album) OR exists(genre)📈 view plot
🚷 view threshold
174.44 ops/s
(+12.55%)Baseline: 155.00 ops/s
30.27 ops/s
(17.35%)
planned: track.exists(album) where title="Big Ones"📈 view plot
🚷 view threshold
7,895.29 ops/s
(-2.44%)Baseline: 8,092.61 ops/s
7,146.52 ops/s
(90.52%)
planned: track.exists(album).exists(genre)📈 view plot
🚷 view threshold
21.21 ops/s
(+86.73%)Baseline: 11.36 ops/s
-0.89 ops/s
(-4.18%)
planned: track.exists(album).exists(genre) with filters📈 view plot
🚷 view threshold
5,268.26 ops/s
(-4.02%)Baseline: 5,488.79 ops/s
3,856.18 ops/s
(73.20%)
planned: track.exists(playlists)📈 view plot
🚷 view threshold
5.44 ops/s
(+15.60%)Baseline: 4.71 ops/s
-1.20 ops/s
(-22.12%)
unplanned: playlist.exists(tracks)📈 view plot
🚷 view threshold
859.05 ops/s
(-6.03%)Baseline: 914.21 ops/s
842.44 ops/s
(98.07%)
unplanned: track.exists(album) OR exists(genre)📈 view plot
🚷 view threshold
22.55 ops/s
(+1.03%)Baseline: 22.32 ops/s
21.27 ops/s
(94.34%)
unplanned: track.exists(album) where title="Big Ones"📈 view plot
🚷 view threshold
35.25 ops/s
(+1.52%)Baseline: 34.72 ops/s
32.83 ops/s
(93.12%)
unplanned: track.exists(album).exists(genre)📈 view plot
🚷 view threshold
21.15 ops/s
(-0.11%)Baseline: 21.17 ops/s
20.08 ops/s
(94.98%)
unplanned: track.exists(album).exists(genre) with filters📈 view plot
🚷 view threshold
35.17 ops/s
(+0.26%)Baseline: 35.08 ops/s
33.02 ops/s
(93.88%)
unplanned: track.exists(playlists)📈 view plot
🚷 view threshold
🚨 view alert (🔔)
5.41 ops/s
(-12.70%)Baseline: 6.20 ops/s
5.74 ops/s
(105.96%)

zpg: (pk lookup) select * from track where id = 3163📈 view plot
🚷 view threshold
925.64 ops/s
(-1.29%)Baseline: 937.75 ops/s
664.95 ops/s
(71.84%)
zpg: (secondary index lookup) select * from track where album_id = 248📈 view plot
🚷 view threshold
1,017.67 ops/s
(+3.14%)Baseline: 986.68 ops/s
755.75 ops/s
(74.26%)
zpg: (table scan) select * from album📈 view plot
🚷 view threshold
711.93 ops/s
(+1.71%)Baseline: 699.93 ops/s
622.01 ops/s
(87.37%)
zpg: OR with empty branch and limit📈 view plot
🚷 view threshold
847.18 ops/s
(-1.43%)Baseline: 859.44 ops/s
668.47 ops/s
(78.91%)
zpg: OR with empty branch and limit with exists📈 view plot
🚷 view threshold
667.61 ops/s
(-5.73%)Baseline: 708.15 ops/s
513.09 ops/s
(76.85%)
zpg: all playlists📈 view plot
🚷 view threshold
5.70 ops/s
(+24.90%)Baseline: 4.57 ops/s
0.87 ops/s
(15.28%)
zpg: scan with one depth related📈 view plot
🚷 view threshold
439.02 ops/s
(+6.39%)Baseline: 412.65 ops/s
320.25 ops/s
(72.95%)
zql: (pk lookup) select * from track where id = 3163📈 view plot
🚷 view threshold
119,820.53 ops/s
(-4.53%)Baseline: 125,504.05 ops/s
103,906.52 ops/s
(86.72%)
zql: (secondary index lookup) select * from track where album_id = 248📈 view plot
🚷 view threshold
2,296.55 ops/s
(+6.59%)Baseline: 2,154.66 ops/s
1,750.15 ops/s
(76.21%)
zql: (table scan) select * from album📈 view plot
🚷 view threshold
6,757.41 ops/s
(+0.77%)Baseline: 6,705.63 ops/s
6,085.31 ops/s
(90.05%)
zql: OR with empty branch and limit📈 view plot
🚷 view threshold
56,927.15 ops/s
(-1.83%)Baseline: 57,986.70 ops/s
43,282.33 ops/s
(76.03%)
zql: OR with empty branch and limit with exists📈 view plot
🚷 view threshold
12,496.03 ops/s
(+1.77%)Baseline: 12,278.52 ops/s
10,776.65 ops/s
(86.24%)
zql: all playlists📈 view plot
🚷 view threshold
🚨 view alert (🔔)
2.68 ops/s
(-37.67%)Baseline: 4.30 ops/s
3.62 ops/s
(135.16%)

zql: edit for limited query, inside the bound📈 view plot
🚷 view threshold
237,291.66 ops/s
(+3.53%)Baseline: 229,197.37 ops/s
212,428.85 ops/s
(89.52%)
zql: edit for limited query, outside the bound📈 view plot
🚷 view threshold
245,064.83 ops/s
(+4.51%)Baseline: 234,485.23 ops/s
196,893.46 ops/s
(80.34%)
zql: push into limited query, inside the bound📈 view plot
🚷 view threshold
114,564.15 ops/s
(+1.69%)Baseline: 112,663.31 ops/s
104,129.41 ops/s
(90.89%)
zql: push into limited query, outside the bound📈 view plot
🚷 view threshold
427,847.04 ops/s
(-1.81%)Baseline: 435,753.24 ops/s
373,404.36 ops/s
(87.28%)
zql: push into unlimited query📈 view plot
🚷 view threshold
354,645.21 ops/s
(+2.59%)Baseline: 345,681.26 ops/s
317,671.71 ops/s
(89.57%)
zql: scan with one depth related📈 view plot
🚷 view threshold
481.91 ops/s
(+0.41%)Baseline: 479.94 ops/s
407.62 ops/s
(84.58%)
zqlite: (pk lookup) select * from track where id = 3163📈 view plot
🚷 view threshold
52,205.05 ops/s
(+16.57%)Baseline: 44,785.12 ops/s
37,760.08 ops/s
(72.33%)
zqlite: (secondary index lookup) select * from track where album_id = 248📈 view plot
🚷 view threshold
11,221.93 ops/s
(+0.85%)Baseline: 11,127.75 ops/s
10,297.06 ops/s
(91.76%)
zqlite: (table scan) select * from album📈 view plot
🚷 view threshold
1,402.54 ops/s
(+3.08%)Baseline: 1,360.66 ops/s
1,199.50 ops/s
(85.52%)
zqlite: OR with empty branch and limit📈 view plot
🚷 view threshold
18,502.05 ops/s
(+1.05%)Baseline: 18,309.53 ops/s
14,882.91 ops/s
(80.44%)
zqlite: OR with empty branch and limit with exists📈 view plot
🚷 view threshold
5,379.63 ops/s
(-3.83%)Baseline: 5,593.77 ops/s
5,049.22 ops/s
(93.86%)
zqlite: all playlists📈 view plot
🚷 view threshold
🚨 view alert (🔔)
1.15 ops/s
(-18.74%)Baseline: 1.42 ops/s
1.26 ops/s
(109.51%)

zqlite: edit for limited query, inside the bound📈 view plot
🚷 view threshold
123,832.84 ops/s
(+1.20%)Baseline: 122,361.23 ops/s
111,271.67 ops/s
(89.86%)
zqlite: edit for limited query, outside the bound📈 view plot
🚷 view threshold
127,614.55 ops/s
(+2.61%)Baseline: 124,364.35 ops/s
112,744.59 ops/s
(88.35%)
zqlite: push into limited query, inside the bound📈 view plot
🚷 view threshold
4,229.48 ops/s
(-0.72%)Baseline: 4,260.27 ops/s
4,021.97 ops/s
(95.09%)
zqlite: push into limited query, outside the bound📈 view plot
🚷 view threshold
152,361.26 ops/s
(+2.96%)Baseline: 147,974.91 ops/s
133,188.62 ops/s
(87.42%)
zqlite: push into unlimited query📈 view plot
🚷 view threshold
125,757.28 ops/s
(-2.92%)Baseline: 129,540.19 ops/s
117,488.65 ops/s
(93.42%)
zqlite: scan with one depth related📈 view plot
🚷 view threshold
166.69 ops/s
(+3.58%)Baseline: 160.94 ops/s
144.32 ops/s
(86.58%)
🐰 View full continuous benchmarking report in Bencher

@grgbkr grgbkr changed the title work refactor(zql): Update join to always fetch by partition key. Nov 7, 2025
*/
constructor(
storage: Storage,
name: string,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need a unique name? I thought all operator storage was already isolated?

}
return KeySet.#makeKeySetStorageKeyForValues(this.#name, [
setKeyValues,
valueKeyValues,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do valueKeyValues come before primaryKeyValues?

Comment on lines +155 to +157
this.#setKey = setKey;
this.#primaryKey = primaryKey;
this.#valueKey = valueKey;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it expected that these columns will never overlap? E.g., id will not be present twice or three times in setKey, primaryKey, valueKey?

}

*getValues(row: Row): Iterable<{
readonly [key: string]: Value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this key here? It doesn't look like it would be a column named based on types (V extends CompoundKey)

return true;
}

export class KeySet<V extends CompoundKey | undefined> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a unit test for this class would help to understand how it is intended to be used.

1,
),
].length === 0;
this.#primaryKeySet.delete(parentNodeRow);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we go ahead and remove cleanup while we're here? If it isn't a simple matter of deleting the cleanup section then in a follow up pr?

@grgbkr grgbkr changed the title refactor(zql): Update join to always fetch by partition key. refactor(zql): Update Join and FlippedJoin to always fetch parent by partition key. Nov 7, 2025
@grgbkr grgbkr changed the title refactor(zql): Update Join and FlippedJoin to always fetch parent by partition key. refactor(zql): Update Join and FlippedJoin to always fetch parent with partition constraint. Nov 7, 2025
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.

3 participants