How do secondary indexes work in Cassandra?

select * from update_audit where scopeid=35 and formid=78005 and record_link_id=9897; How the above query will work internally in cassandra? Essentially, all data for partition scopeid=35 and formid=78005 will be returned, and then filtered by the record_link_id index. It will look for the record_link_id entry for 9897, and attempt to match-up entries that match the rows … Read more

Cassandra cqlsh – how to show microseconds/milliseconds for timestamp columns?

In an effort to answer your questions, I did a little digging on this one. Does Cassandra capture microseconds with timestamp data type? Microseconds no, milliseconds yes. If I create your table, insert a row, and try to query it by the truncated time, it doesn’t work: aploetz@cqlsh:stackoverflow> INSERT INTO data (datetime, id, type, data) … Read more

cassandra get all records in time range

The timeout is because Cassandra is taking longer than the timeout (default is 10 seconds) to return the data. For your query, Cassandra will attempt to fetch the entire dataset before returning. For more than a few records this can easily take longer than the timeout. For queries that are producing lots of data you … Read more