For operational reasons, you should familiarize yourself with the underlying
database schema. The schema is implemented as two tables, Streams and
Messages, and a number of indexes.
The Streams table contains the collection of unique streams in the store. As
stream Ids are strings there are a number of optimisations applied:
-
The original stream Id is stored in column
IdOriginaland limited to 1000 characters. -
When a stream is appended for first time is it checked to see if it is parsable as a
Guid. If so, then that is stored in theIdcolumn. If not then aSha1hash of the Id is generated and used. This helps with stream lookups and the Id unique index constraint. -
An
IdInternalidentity column is used for joins with the messages table.
Please refer to CreateSchema.sql for full schema details.
TODO
TODO
TODO