In the Cassandra compound PK approach, the first index is hashed which determines the partition position, and the other indices are appended to the index which can be used for range queries. This works well in practice since the first index is typically an ID where we don’t do range queries on, whereas subsequent columns can be columns where range queries are useful ((user_id, upload_timestamp)).