April 2017
Beginner to intermediate
360 pages
9h 35m
English
Clustering columns are not limited to one field as specified before. Let's take a look at how multiple clustering columns work and facilitate data ordering. To illustrate this, we will recreate our status updates table so that it is clustered by the date and time when the user updated their status:
CREATE TABLE "user_status_updates_by_datetime" ( "username" text, "status_date" date, "status_time" time, "body" text, PRIMARY KEY ("username", "status_date", "status_time") );
We have created a new table user_status_updates_by_datetime as shown next:
Read now
Unlock full access