Database Reference
In-Depth Information
SELECT * FROM "user_follows"
WHERE "follower_username" = 'bob';
But this time, we'll get the results we're looking for:
This is the first time we've been able to construct a query that looks up rows by a column
value without specifying the partition key. Secondary indexes give a significant new tool
when designing our data models and access patterns.
Note
In this case, we created a secondary index on a clustering column, but there's no restric-
tion on the kind of column that can be used for a secondary index. We'll explore more ex-
amples here and in Chapter 8 , Collections, Tuples, and User-defined Types .
Search WWH ::




Custom Search