#5236Requested

Multi Column Primary Keys

Requested by @kistz
Energy Committed1,065,105TeVfrom 10 boosters

We already have btree and hash indicies but the hash index route for mutli column indices is not ideal to enfore the uniqueness invariant in a convenient way.
This would also be immensily usefull for procedural view primary keys because you could actually determine a pk for a subset of your data :>

Requested by @kistz via the SpacetimeDB site.

  1. website-features added the feature-request label Jun 4, 2026
  2. I think this would be a great feature. I assume this means I could removed all my redundant ID columns and use a combination of columns instead for a unique primary key. If this is the case, I'd be able to reduce the size of almost all my tables. A very nice win.

Boost this Request

Reopen this request?

The request will return to its prior live status.

Mark as Duplicate

Pick the request that Multi Column Primary Keys 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.