2017-03-20 15 views
1

Cassandraでの読み取り操作に必要なディスクシークの最大数を理解しようとしています。 https://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlAboutReads.htmlCassandra - 読み取り要求のディスクシーク数

私の理解しているように、最悪の場合、2つのディスクシークが必要です。 1つはパーティションインデックスを読み取るためのもので、もう1つは圧縮されたパーティションから実際のデータを読み取るためのものです。圧縮パーティション内のデータのインデックスは、圧縮オフセットテーブル(メモリに格納されている)から取得されます。私は正しい道にここにいますか?データの読み取りに2回以上のディスクシークが必要な場合はありますか?

答えて

0

私は他の誰かがそれを必要とする場合には、私はカサンドラユーザーコミュニティのスレッドから受信し、ここで答え掲示しています:

youre right – one seek with hit in the partition key cache and two if not. 
Thats the theory – but two thinge to mention: 

First, you need two seeks per sstable not per entire read. So if you data is spread over multiple sstables on disk you obviously need more then two reads. Think of often updated partition keys – in combination with memory preassure you can easily end up with maaany sstables (ok they will be compacted some time in the future). 

Second, there could be fragmentation on disk which leads to seeks during sequential reads. 

Note: Each SSTable has it's own partition index. 
関連する問題