Query optimisation: share initial snapshots across LIMIT variants of the same query (donor windows)
Los mantenedores suelen responder en 1 día
@sprihaanand-juspay ya está trabajando en esto.
Desde el 30/11/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Problem
Two subscriptions that differ only in LIMIT each issue their own
PostgreSQL snapshot read:
SELECT * FROM tickets WHERE status = 'OPEN'
ORDER BY created_at DESC, id ASC LIMIT 50; -- read LIMIT 100 → PG round-trip
SELECT * FROM tickets WHERE status = 'OPEN'
ORDER BY created_at DESC, id ASC LIMIT 20; -- read LIMIT 40 → PG round-trip (redundant)
The second read fetches rows the first already holds in memory. Today twin sharing only matches structurally identical queries (by_query is keyed on the full SingleTableReadQuery, which includes limit — src/model/query.rs), so LIMIT 20 and LIMIT 50 never meet.
Proposal
When a new subscription has the same table, filter, and ORDER BY as an existing one but a smaller limit, serve it from the existing subscription's held rows (share_rows) instead of reading storage again.
OPEN tickets LIMIT 50 → SELECT ... LIMIT 100 → PG round-trip
OPEN tickets LIMIT 20 → reuse the 50's rows → 0 PG reads
This is the donor model: registration-time only. After registration the child is independent — own Window, own frontier, own refills. The engine
already works this way for twins (shared row images via subscriber tags; per-sub window in windows: IdMap<SubId, Window>), so Phase 1 mostly relaxes the lookup.
- Lenguaje dominante
- Rust
- Estrellas
- 129
- Forks
- 7
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de juspay/streamgres
-
Make the top-L client diff cost depend on what changed, not on the limitPosiblemente ocupada @SahilKhan101 la tomó hace 2 días. Abiertoenhancement
juspay/streamgres#64 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 Más de una semana Aptitud para principiantes 38/100
juspay/streamgres#56 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
juspay/streamgres#55 ·
Los mantenedores suelen responder en 1 día
-
PgBouncer transaction pooling: `prepare` runs outside the read transaction and can land on another backendPosiblemente ocupada @sprihaanand-juspay la tomó hace 6 días. Abierto
juspay/streamgres#53 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
juspay/streamgres#49 ·
Los mantenedores suelen responder en 1 día
Todos los issues de juspay/streamgres
Issues similares
-
Android: a long press's `contextmenu` event carries no point (`clientX` and `clientY` are 0)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Test connection's password prompt says the password is never saved, also for a keychain profileAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
area: settings bug Haiku review: no-score ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
MMFoundation/WallpaperMachine#346 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
rubys/roundhouse#2473 ·
-
bug mod: quantum info
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Qiskit/qiskit#17699 · 2 comentarios ·
Los mantenedores suelen responder en 1 día