- Learning Apache Cassandra(Second Edition)
- Sandeep Yarabarla
- 172字
- 2021-07-03 00:19:38
Looking up rows by partition
The core reading experience of the MyStatus application will be an interface to read a given user's status updates. In order to do this, we need to be able to retrieve status updates for a given user from the user_status_updates table. As you might expect, this follows naturally from the CQL syntax we've seen in previous chapters:
SELECT * FROM "user_status_updates"
WHERE "username" = 'alice';
Previously, we've used the WHERE keyword to specify an exact value for a full primary key. In the preceding query, we only specify the partition key part of the primary key, which allows us to retrieve only those rows that we've asked for the partition:
In the results, we only see the rows whose username is alice. To emphasize what we discussed in the previous chapter, in the Looking up a specific status update section, this is a very efficient query. Cassandra stores all of alice's status updates together, already in order; so returning this view of the table is quite inexpensive.
- Internet接入·網(wǎng)絡(luò)安全
- Ansible Configuration Management
- 現(xiàn)代測控系統(tǒng)典型應(yīng)用實(shí)例
- 大數(shù)據(jù)導(dǎo)論:思維、技術(shù)與應(yīng)用
- 大數(shù)據(jù)管理系統(tǒng)
- 基于LPC3250的嵌入式Linux系統(tǒng)開發(fā)
- Photoshop CS4經(jīng)典380例
- B2B2C網(wǎng)上商城開發(fā)指南
- PyTorch Deep Learning Hands-On
- Embedded Programming with Modern C++ Cookbook
- 高維聚類知識發(fā)現(xiàn)關(guān)鍵技術(shù)研究及應(yīng)用
- 精通數(shù)據(jù)科學(xué):從線性回歸到深度學(xué)習(xí)
- INSTANT VMware vCloud Starter
- 軟測之魂
- Mastercam X5應(yīng)用技能基本功特訓(xùn)