event-reduce
pubkey/event-reduce · Public GitHub repository
An algorithm to optimize database queries that run multiple times https://pubkey.github.io/event-reduce/
Open the project to try its demo, view the repository, or save it to your collection. Repository and demo actions use RepoShelf’s sign-in flow.

About this project
Author-written excerpt from the project README.
Update live query results from change events without re-running the query
Live demo · JavaScript implementation · How it works · FAQ
EventReduce is an algorithm for live queries (also called reactive or realtime queries). When a document is inserted, updated or deleted, it takes the old query results and the change event and computes the new results in memory, without querying the database again. It works like a lightweight form of incremental view maintenance for a single query over a single table or collection.
- 94% of write events in the browser demo are handled without re-running the query
- Up to 12× faster delivery of new query results after a write
- Works with any database that gives you a change stream: MongoDB, PostgreSQL, MySQL, IndexedDB, SQLite, in-memory stores...
- Proven in production as the query engine behind the live queries of RxDB
Requirements and intended audience
Update live query results from change events without re-running the query
Not recorded: account, external api key, paid service, self-hosting. Missing information does not mean there are no requirements.
Statements extracted from the author’s documentation · Checked 2026-10-20. Source: https://github.com/pubkey/event-reduce/blob/master/README.md
Recorded maintenance information
Last recorded source update: 2026-11-04. Saved release: 5.1.0 · 2023-12-12. These dates do not guarantee ongoing maintenance.
- Technologies
- TypeScript
- Licence
- MIT. Generally permits modification and commercial use, subject to the licence’s notices and conditions.
- Demo check
- A public page loaded on 2026-11-06. This does not test every feature.
Browse related categories
More projects to explore
awesome-selfhosted
awesome-selfhosted/awesome-selfhosted
A list of Free Software network services and web applications which can be hosted on your own servers
awesome-go
avelino/awesome-go
A curated list of awesome Go frameworks, libraries and software
NextChat
ChatGPTNextWeb/NextChat
✨ Zero-config AI chat assistant. No API key needed — sign up and instantly chat with GPT-5, Claude 4, Gemini 2.5, DeepSeek & 100+ top models. Pay-as-you-go saves you more. Available on Web, iOS, macOS, Android, Linux, Windows.
vue-element-admin
PanJiaChen/vue-element-admin
A magical vue admin https://panjiachen.github.io/vue-element-admin