#4750Requested

Pagination for views and tables

Requested on GitHub by xDovos
Energy Committed64,101TeVfrom 12 boosters

it would be really useful to have an index type for pagination. my idea is #[index(page(page_size)) (idk rust enough if that is valid/good syntax for this) that is accessed with ctx.db.table.column.page(nr) and returns the subset of rows defined by the page_size that's sorted by the column it was used on.

this would simplify and optimise leaderboards, Auction pages, any form of listings and so on a lot.
once view parameters are out, it would be possible to make a view that takes the page nr as parameter and then just get the subset without having to manually sort and subset the data within the view.

as for the client updates, the client could just insert sort the new and deleted rows, so there is no need to change bsatn or the WS protocol for that

  1. bfops added the feature-request label Apr 15, 2026
  2. This is crucial to support web, for example the company I work for has clients with millions of records so it would be impossible to consider spacetimedb as a backend without pagination.

  3. cloutiertyler renamed to "Pagination for views and tables" Jun 4, 2026
  4. website-features marked this as a duplicate of #4750 Jun 4, 2026

Boost this Request

Reopen this request?

The request will return to its prior live status.

Mark as Duplicate

Pick the request that Pagination for views and tables is a duplicate of. Energy rolls up into that request and GitHub closes the linked issue as a duplicate with a timeline reference to the canonical.

Unmark Duplicate

Restore as an independent request. The linked GitHub issue will be reopened and its duplicate-of relationship cleared. The original timeline entries stay as history; the note below is posted as a follow-up comment.