An access pattern is a recurring form of data retrieval or mutation that an application must support. In ScyllaDB, it guides data modeling: design tables around the queries the application needs to perform. section 1.2.7 section 2.3.2
For the restaurant-review application, useful access patterns include:
- Read all reviews for one restaurant by querying the partition key. section 2.3.2
- Read a review by restaurant and ordering time, supplying both restrictions so the query can reach the relevant partition. section 2.3.2
- Avoid queries that filter only by a non-partition-key column, because ScyllaDB may scan every partition. section 2.3.2
Restaurant reviews
SELECT * FROM initial.food_reviews WHERE restaurant = 'Ernie''s Eats'; reads reviews within one partition. Adding ordered_at narrows the lookup further, while filtering only by ordered_at can trigger a warning and an expensive scan. section 2.3.2
cqlsh> SELECT * FROM initial.food_reviews WHERE restaurant = 'Ernie''s Eats';
Browse a partition-key query that retrieves the reviews for one restaurant. section 2.3.2


