Query optimisation: share initial snapshots across LIMIT variants of the same query (donor windows)
Maintainer thường phản hồi trong vòng 1 ngày
@sprihaanand-juspay đang làm issue này rồi.
Từ ngày 30/11/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 129
- Fork
- 7
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của juspay/streamgres
-
Make the top-L client diff cost depend on what changed, not on the limitCó thể đã có người làm @SahilKhan101 đã nhận 2 ngày trước. Đang mởenhancement
juspay/streamgres#64 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 Hơn một tuần Mức phù hợp với người mới 38/100
juspay/streamgres#56 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
juspay/streamgres#55 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
PgBouncer transaction pooling: `prepare` runs outside the read transaction and can land on another backendCó thể đã có người làm @sprihaanand-juspay đã nhận 6 ngày trước. Đang mở
juspay/streamgres#53 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
juspay/streamgres#49 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của juspay/streamgres
Issue tương tự
-
Android: a long press's `contextmenu` event carries no point (`clientX` and `clientY` are 0)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Test connection's password prompt says the password is never saved, also for a keychain profileĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area: settings bug Haiku review: no-score ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MMFoundation/WallpaperMachine#346 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
rubys/roundhouse#2473 ·
-
bug mod: quantum info
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Qiskit/qiskit#17699 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày