domingo, 15 de abril de 2012 20:19
If entities stored inside a table uses 2 partition keys "A" and "B", will they then always be splitted into seperate nodes/servers or is it only a description of how data should be places across seperate nodes/servers if performance becomes an issue?
Todas as Respostas
domingo, 15 de abril de 2012 20:37The guarantee is that all rows of a partition will be on the same node. (Although all rows of one or more or all partitions can be on the same node if the node can accommodate them).
Hence the requirement is that the size of a partition should not be so large, that all its rows cannot be accommodated on a single node.
domingo, 15 de abril de 2012 20:54Yes, meaning I can easily put a lot lets say "events" inside an eventtable, assign each event a uniqueue partitionkey, and if needed the events table will be scaled into more nodes based on the partition keys.
Best regards Rasmus Christensen
segunda-feira, 16 de abril de 2012 03:49Moderador
Tables are partitioned to support load balancing across storage nodes. A table's entities are organized by partition. A partition is a consecutive range of entities possessing the same partition key value. The partition key is a unique identifier for the partition within a given table, specified by the PartitionKey property.
Accroding to your description, i think different partitionKey does not mean they "must" splitted into seperate nodes/servers. The different partition keys may stored in the same server, but the same partitionKey rows were maintained by partitionKey server to improve query performance.
In your situation, I think if you set the "eventID" as the partitionKey of "user" table, it's beneficial of query the users who attend in this event (via EventID), but if you need query how many events a user attend, the "eventID" partitionKey may not efficiently (here userId may a good potential partitionKey), so i think partitionKey is decide by your design, you can observe with query method is the most common one, and set the appropriate partitionKey.
Hope this helps.
- Marcado como Resposta Rasmus Christensen domingo, 22 de abril de 2012 13:04