What are the alternatives for powering secondary indexes on Google Bigtable (or any other distributed data-base which natively doesn't has any secondary indexing support).
Usecase :
- I have ~5 billion rows on my 'Orders' table (row-key is orderId), and want to add a secondary index on the 'customerID' attribute
- I can live with secondary index being eventually consistent (Would be great of strong consistency can be achieved).
Would like to know the possible ways by which this can be achieved. (pros/cons)
(I can think of a way of maintaining this secondary index using a separate table and managing it from the application layer itself. But want to understand the pros/cons around it, or any other recommended patterns).
Bigtable doesn’t have explicit support for secondary indexing.In Bigtable, schema design is driven primarily by the queries, or read requests, that you plan to send to the table. Because reading a row range is the fastest way to read your Bigtable data.
If you are open to other cloud services you can check Google's Cloud Spanner,which has built-in support for secondary indexes.you can refer to this document
As mentioned here