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 – Is there a way to limit number of async queries?

You can use a semaphore to throttle the number of concurrent queries: final Semaphore semaphore = new Semaphore(numberOfConcurrentQueries); … semaphore.acquire(); try { ResultSetFuture future = session.executeAsync(“…”); Futures.addCallback(future, new FutureCallback<ResultSet>() { @Override public void onSuccess(ResultSet result) { semaphore.release(); } @Override public void onFailure(Throwable t) { semaphore.release(); } }); } catch (Exception e) { semaphore.release(); } But … Read more