How Cassandra stores data for materialized views

advertisements

I am wondering what's the cost for the disk space for the materialized views?

If I have a base table with 10 fields, primary keys are f1, f2, f3. I create one materialized view from it, which include all the 10 fields, primary keys are f4, f1, f2, f3.

How much disk space the materialized view takes?

Almost same disk as the base table?

Or the materialized view only uses disk for its primary keys f4, f1, f2, f3.

I kind of think it's the first case. - as materialized view is implemented as a normal Cassandra table.


Your supposition is correct -- it will take about the same amount of disk space as the base table. The materialized view is implemented as a distinct table, and no data de-duplication is done.