Query optimisation: share initial snapshots across LIMIT variants of the same query (donor windows)
Les mainteneurs répondent en général sous 1 jour
@sprihaanand-juspay y travaille déjà.
Depuis le 30/11/2026.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
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.
- Langage dominant
- Rust
- Étoiles
- 129
- Forks
- 7
- Merge moyen
- 1 j 19 h
- PR mergées (30 j)
- 5
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de juspay/streamgres
-
Make the top-L client diff cost depend on what changed, not on the limitPeut-être pris @SahilKhan101 l’a pris il y a 2 jours. Ouverteenhancement
juspay/streamgres#64 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 Plus d'une semaine Accessibilité débutants 38/100
juspay/streamgres#56 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
juspay/streamgres#55 ·
Les mainteneurs répondent en général sous 1 jour
-
PgBouncer transaction pooling: `prepare` runs outside the read transaction and can land on another backendPeut-être pris @sprihaanand-juspay l’a pris il y a 6 jours. Ouverte
juspay/streamgres#53 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
juspay/streamgres#49 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de juspay/streamgres
Issues similaires
-
Android: a long press's `contextmenu` event carries no point (`clientX` and `clientY` are 0)Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Test connection's password prompt says the password is never saved, also for a keychain profileOuvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
area: settings bug Haiku review: no-score ui
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
MMFoundation/WallpaperMachine#346 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
rubys/roundhouse#2473 ·
-
bug mod: quantum info
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Qiskit/qiskit#17699 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour