0

We are migrating from oracle to cassandra. We have a requirement to do minimal changes to the application.

Three questions came up when i am doing POC on cassandra.

  1. In a Oracle we have created multiple composite indexes but i don't find any document saying cassandra will support that. Is it possible to create multiple composite indexes?. If not any suggestion on this.

  2. Our Txn table is having 7 out of 15 columns used in where clause. Without index i cannot put that column in where clause. Even if i create multiple secondary index, In where clause, Casandra will select one column with low cardinality and it will not use other secondary indexes i have created. Any other way to improve the performance?

  3. Problem on creating index on boolean data type. This is how we are decided to create a table/columnfamily

create table dept( emp_name varchar, emp_id int, dept_id int, dept_name varchar, active boolean, primary key(dept_id,emp_id));

In application we have queries like below 1. select * from dept where dept_name='software'; I have created secondary index for dept_name. So This problem is solved.

  1. select * from dept where dept_id=1001 and active = 'Y'; I feel difficult to create indexes for this query. Since active column is a boolean type, creating secondary index is not useful. Without index i will not able to include that condition in where clause.

Any suggestions for my queries?

4

0 回答 0