Forum: VoltDB Architecture

Post: Internal Representation of Replicated Tables

Internal Representation of Replicated Tables
henning
May 16, 2010
Are replicated tables, which can be expected to be almost read-only, represented differently in memory, from other tables, e.g. in fixed length arrays?


Could you point me to the source files of their implementation?


Thanks,
Henning
Not really.
jhugg
May 16, 2010
Currently, replicated tables are implemented the same way partitioned tables are implement, just with an additional flag and some extra "if" statements. Largely, the distinction comes from the planner, which decides how to distribute reads and writes such that the replication is consistent. Even still, they're 98% the same code.


We DO have an unsupported ARRAY table type that we have used in our psuedo-tppc benchmark. It creates an array table of size about 130000. And uses the primary key value as an offset. Sadly, this is an exact size and not configurable. If you use a primary key not in the range 0-130000ish, I'm not sure what would happen.


In the future we plan to improve this functionality and actually support this kind of table (ENG-95), but I can't make any promises as to when. We'd also like to support index only tables IOT (ENG-541).


For the moment, regular tables are pretty fast.