Motoko developers building on the Internet Computer now have a new option for handling large datasets with the release of ZenDB, an embedded document database designed to run directly inside canisters. The project aims to make data-heavy applications easier to build by offering a familiar, MongoDB-style query model while relying on stable memory rather than the limited heap.
ZenDB is built around the reality that the Internet Computer’s heap is capped at 6GB, a constraint that has pushed many developers towards complex multi-canister designs or custom-built storage layers. By using stable memory as its primary store, ZenDB supports datasets that can grow to hundreds of gigabytes within a single canister. The trade-off is higher instruction costs per write, something the developer behind ZenDB openly acknowledges.
The database provides a document-oriented API that allows nested records, schema validation, secondary indexes and complex queries without requiring developers to manually manage memory layouts, serialisation logic or index structures. Queries can combine range filters, logical operators and pagination, with ZenDB handling query planning and index selection internally.
To test whether the approach works beyond theory, the developer built a live application that indexes the full history of Internet Computer transactions. More than 31 million ledger transactions were stored and queried from a single canister using ZenDB. According to the published figures, the indexing process reached a steady rate of about 5,000 transactions per minute after tuning index configurations and working around instruction limits. The total cycle cost to index the full dataset came in at just under 500 trillion cycles, most of it consumed by the database canister.
Performance and cost transparency are central to how ZenDB is being presented. The project does not claim to be a universal replacement for simpler data structures. For applications with small datasets or basic key-value access patterns, traditional heap-based structures may still be a better fit. ZenDB is positioned instead for read-heavy workloads such as archives, analytics dashboards and historical logs, where complex queries over large datasets matter more than minimal instruction counts.
There are also clear limitations. Multi-field sorting, aggregations and full-text search are not yet supported, and schema changes require manual migration. Index design remains the responsibility of the developer, with poorly chosen indexes risking instruction limit failures on large collections. Stable memory deallocation is another known issue, meaning unused memory from dropped indexes cannot currently be reclaimed.
Even with these constraints, ZenDB reflects a broader push within the ICP ecosystem to lower the barrier for building data-intensive applications without resorting to fragmented architectures. For Motoko developers used to external databases or custom storage code, it offers a more approachable, though not cost-free, alternative that keeps data and logic within the canister itself.
Dear Reader,
Ledger Life is an independent platform dedicated to covering the Internet Computer (ICP) ecosystem and beyond. We focus on real stories, builder updates, project launches, and the quiet innovations that often get missed.
We’re not backed by sponsors. We rely on readers like you.
If you find value in what we publish—whether it’s deep dives into dApps, explainers on decentralised tech, or just keeping track of what’s moving in Web3—please consider making a donation. It helps us cover costs, stay consistent, and remain truly independent.
Your support goes a long way.
🧠 ICP Principal: ins6i-d53ug-zxmgh-qvum3-r3pvl-ufcvu-bdyon-ovzdy-d26k3-lgq2v-3qe
🧾 ICP Address: f8deb966878f8b83204b251d5d799e0345ea72b8e62e8cf9da8d8830e1b3b05f
🪙 BTC Wallet: bc1pp5kuez9r2atdmrp4jmu6fxersny4uhnaxyrxau4dg7365je8sy2q9zff6p
Every contribution helps keep the lights on, the stories flowing, and the crypto clutter out.
Thank you for reading, sharing, and being part of this experiment in decentralised media.
—Team Ledger Life





Community Discussion