Let's say that we wanted to be able to offer up the same data, but to support a query for users by department. The table definition would change to something like this:
CREATE TABLE users_by_dept ( username TEXT, email TEXT, department TEXT, title TEXT, AD_groups TEXT, PRIMARY KEY ((department),username))WITH CLUSTERING ORDER BY (username ASC) AND COMPACTION = {'class':'LeveledCompactionStrategy', 'sstable_size_in_mb':'200'};
As the preceding table will be read more than it will be written to (users queried more often than they are added), we also designate use of LeveledCompactionStrategy.