MySQL storage¶
Dedicated MySQL / MariaDB backend.
Install¶
Setup¶
builder.Services
.AddOpStream()
.UseMySqlStorage(options =>
{
options.ConnectionString = builder.Configuration.GetConnectionString("OpStream")!;
options.AutoMigrate = true;
});
// Or the shorthand
builder.Services.AddOpStream().UseMySql(connStr);
Schema¶
The standard stored_ops + snapshots shape (see
SQL Server / PostgreSQL)
with MEDIUMBLOB / LONGBLOB payload columns appropriate to MySQL.
Performance notes¶
- Default
innodb_buffer_pool_sizematters more for OpStream's scan-by-prefix reads than for OLTP. Size it to fit your hottest documents. - Ensure
innodb_doublewrite = ONfor durability; OpStream's append-only write pattern doesn't amplify the doublewrite cost significantly.
When to pick this¶
- LAMP-style stack, existing MySQL operational expertise.
- Greenfield deploy — consider PostgreSQL for stronger feature parity with OpStream's roadmap.