As you say, partitions in Ignite are about the distribution of data. You can group together related data using affinity keys, but if you only have three distinct values that would be a really bad idea. You can’t change the number of partitions after a table has been created.
Either of your other solutions would work but, to be honest, I’m not completely sure what problem you’re trying to solve. > On 13 Jul 2022, at 19:24, Wen Bo (Bill) Li <[email protected]> wrote: > > Hi, > > The traditional RDBMS has the concept of partitioning a table into different > chunks, but that isn't really partitioning data to different nodes as > described in the Ignite document. Our team is trying to partition a table > based on the values of one column and query data based on these values. For > example, there are 3 different values in our partitioned column, A, B and C, > and we want to get all data that belong to C and don't want to read anything > that belong to A and B. > > We have a few ideas on doing this as indicated below: > Create separate tables for A, B and C > Use index for the partitioned column > Use affinity key for the partitioned column (this is more related to if the > data are on the same node) > I am curious if the above 3 approaches are valid or if there is another way > to do this? Is it possible to do the ALTER command in the RDBMS to add > partitions? Thanks. > > Regards, > Bill
