We have a table that record a transaction with timestamp column. The clustering key is the timestamp column descending. Does this affect performance?
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
We have a table that record a transaction with timestamp column. The clustering key is the timestamp column descending. Does this affect performance?
@gmldba_107428 No, it shouldn't. Perhaps if you elaborate on why you are concerned, we'd be able to address it. Cheers!
On other technologies, a clustering key that is descending, that insert files at the beggining of the list all the time, causes disk performance issues. I thought that due to the immutable nature of the files in Cassandra, that wouldn't be the case. I was double checking.
Right. New items do not get inserted at write time -- just gets appended to the end of the commit log. At a later point in time, the fragments of a partition get coalesced by the compaction process based on the compaction strategy on the table so it won't suffer the same disk performance issue as you described. Cheers!
[Post converted to comment since it is not an "answer"]
[Follow up question posted in #10028]
6 People are following this question.
DataStax Enterprise is powered by the best distribution of Apache Cassandra ™
© 2022 DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.
Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.
Privacy Policy Terms of Use