Google Cloud Spanner recommends against using monotonically increasing integers for primary keys. This makes a perfect sense for top-level tables as it would create hotspots. But what about interleaved tables? They are going to be stored on the same node anyway. They are also kept in a sorted order so using UUID or some other random ID seems suboptimal, especially if they are going to be retrieved in the sorted order as well.
Is reading the max id and storing maxId + 1 for a new row the right solution here?