You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sharded databases often need the ability to join their tables with smaller “reference” tables. For example, the product table could be seen as a reference table. Other use cases are tables that map static information like zip code to city, etc.
Joining against these tables across keyspaces results in cross-shard joins that may not be very efficient or fast.
Vitess allows you to create a table in a sharded keyspace as a reference table. This means that it will treat the table as having an identical set of rows across all shards. A query that joins a sharded table against such reference tables is then performed locally within each shard.
However maintaining reference tables is not supported intrinsically by Vitess. The user is expected to keep copies of the tables in all the shards of the keyspaces where they are needed and sync them with the source tables as they get modified. They would setup a Materialize workflow with a select * from <table> filter for all the reference tables.
It will be great if Vitess can support reference table materialization by extending the current Materialize command where we can provide a list of tables to copy to all shards in the target keyspace.
Feature Description
Sharded databases often need the ability to join their tables with smaller “reference” tables. For example, the product table could be seen as a reference table. Other use cases are tables that map static information like zip code to city, etc.
Joining against these tables across keyspaces results in cross-shard joins that may not be very efficient or fast.
Vitess allows you to create a table in a sharded keyspace as a reference table. This means that it will treat the table as having an identical set of rows across all shards. A query that joins a sharded table against such reference tables is then performed locally within each shard.
However maintaining reference tables is not supported intrinsically by Vitess. The user is expected to keep copies of the tables in all the shards of the keyspaces where they are needed and sync them with the source tables as they get modified. They would setup a Materialize workflow with a
select * from <table>
filter for all the reference tables.It will be great if Vitess can support reference table materialization by extending the current
Materialize
command where we can provide a list of tables to copy to all shards in the target keyspace.See: https://vitess.io/docs/20.0/user-guides/vschema-guide/advanced-vschema/#reference-tables
The text was updated successfully, but these errors were encountered: