Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

laxmikant.hcl_32751 avatar image
laxmikant.hcl_32751 asked ·

Why is 100,000 rows per partition or less the recommendation?

As far as I understand, to avoid too much heap pressure and read latency it is better to have the partition size within 100 MB. Also theoretically we can have 2B cell in a row but the practical size is to not go beyond 100k. same applies to a number of tombstones with in a partition by default because of the default tombstone threshold limit.

However why you are recommending 100k rows in a partition. Can't I have a 300k rows in a partition where my partition size is still 50 MB?

data modeling
1 comment
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Just letting you know that we've had a high volume of questions in the last 48 hours and we've been caught up with the FREE Cassandra Workshop Series so our responses are delayed but we will get to them in the next few hours. Cheers!

0 Likes 0 · ·
smadhavan avatar image
smadhavan answered ·

@laxmikant.hcl_32751, you will get find additional details about large/wide partitions here.

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

bettina.swynnerton avatar image
bettina.swynnerton answered ·

Hi,

the big drawback of large partitions is size. So yes, if you have 300k rows and stay under 100MB, you are probably fine.

However, 100k rows is a good "rule of thumb" to stay below the recommended 100MB per partition, and in practice it is much easier to count rows than size of a partition.

These are recommendations, not enforced limits, and we passing on best practice guidelines.

I hope this helps!


Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.