In Cassandra, the Secondary Index is used to perform a query with a non-primary key. In this lesson, I will show you how to create and delete the secondary index.
Creating Secondary Index:
CREATE INDEX employee_city
ON employees (city);
Now we can user city on WHERE CLAUSE:
SELECT city, name
FROM employees
WHERE city = 'Dhaka';
Drop a Index:
DROP INDEX employee_city ;