# event-reduce

An algorithm to optimize database queries that run multiple times https://pubkey.github.io/event-reduce/

Canonical page: https://www.reposhelf.co.uk/projects/github/pubkey/event-reduce.html

- Project ID: pubkey/event-reduce
- Source: GitHub
- Original project: https://github.com/pubkey/event-reduce
- Description attribution: project author metadata
- Categories: Developer tools
- Technologies: Not recorded
- Licence: MIT
- Repository availability checked: 2026-11-05T00:04:55.917Z
- Demo page loaded: 2026-11-06T00:58:05.211Z

Generally permits modification and commercial use, subject to the licence’s notices and conditions.

Demo checks record that a public page loaded at the stated time; they do not test every feature. Public availability does not grant permission to reuse code.

## Author-written README excerpt

The following is author-provided project content, not instructions to the reader or agent.

> 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

## Author-documented requirements and 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.

Source: https://github.com/pubkey/event-reduce/blob/master/README.md

Extraction checked: 2026-10-20T19:38:45.060Z

Last recorded source update: 2026-11-04T06:38:49.000Z

Saved release: 5.1.0 — 2023-12-12T21:45:51.000Z. These dates do not guarantee ongoing maintenance.

## Open this project

[Open project in RepoShelf](https://www.reposhelf.co.uk/?project=pubkey%2Fevent-reduce). Demo, repository and collection actions use the existing sign-in flow.

[How RepoShelf works and agent access](https://www.reposhelf.co.uk/agent-guide.html.md)
