Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Cassandra store data for materialized views

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.

like image 759
jeffery.yuan Avatar asked Sep 13 '25 21:09

jeffery.yuan


2 Answers

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.

like image 163
Adam Holmberg Avatar answered Sep 17 '25 16:09

Adam Holmberg


I think what you are looking is present in detail in the below link ; -

http://www.datastax.com/dev/blog/materialized-view-performance-in-cassandra-3-x

like image 22
Piyush_Rana Avatar answered Sep 17 '25 16:09

Piyush_Rana