I'm reading book Designing Data Intensive Applications, currently on chapter about partitioning which describes secondary indexes where one example is local index (document-based partitioning) and global index which is term-partitioned. The picture below shows example of the global index.
The book says that global indexes perform better since index can be read from the single partition based on the "term". However what I don't get, is the index itself holding all rows that contain this term or following index read, next queries must be done to fetch data from all partitions that can contain the data? This would be little more efficient in comparison to local indexes where query must be send to all partitions, depending on the number of partitions.
In the summary of the chapter author wrote
Term-partitioned indexes (global indexes), where the secondary indexes are partitioned separately, using the indexed values. An entry in the secondary index may include records from all partitions of the primary key. When a document is written, several partitions of the secondary index need to be updated; however, a read can be served from a single partition.
Am I missing something here?
