I'm trying to define, using the interleaving approach of Google Spanner, a mechanism to have rows from several tables in the same split. According to the documentation (https://cloud.google.com/spanner/docs/schema-and-data-model#database-splits), rows that share the same primary key prefix are placed in the same split. But what is defining the "same primary key prefix"? Let's put an example. I've three tables with primary keys:
table A has PK (C1, CA)
table B has PK (C1, CB)
table C has PK (C1, CC)
These three tables share the first element of their primary key, column C1. I wish that all rows with the same value for C1 to go to the same split.
Can I define table A as the parent table for B and C?
Do I need to create a dummy table with PK (C1)?
Any other approach?
The database will have lots of reads, many updates but few inserts.
Any suggestion will be highly appreciated.
Thanks