- Learning Apache Cassandra(Second Edition)
- Sandeep Yarabarla
- 111字
- 2021-07-03 00:19:31
Selecting more than one row
Let's say we'd like to build an administrative interface that allows employees to access data for several users on one screen. We could, of course, simply perform a query for each username specified, but Cassandra gives us a more efficient way to do this:
SELECT * FROM "users"
WHERE "username" IN ('alice', 'bob');
This query will return two rows: one with the alice primary key and the other with the bob primary key:
Note that while this will be faster than performing two queries, it does require Cassandra to perform two seeks for the two rows, so querying for the additional row comes at some cost.
推薦閱讀
- 電氣自動化專業(yè)英語(第3版)
- Managing Mission:Critical Domains and DNS
- 人工免疫算法改進及其應(yīng)用
- HBase Design Patterns
- 最簡數(shù)據(jù)挖掘
- 機器學(xué)習(xí)流水線實戰(zhàn)
- 現(xiàn)代傳感技術(shù)
- 云原生架構(gòu)進階實戰(zhàn)
- Red Hat Linux 9實務(wù)自學(xué)手冊
- PVCBOT機器人控制技術(shù)入門
- SAP Business Intelligence Quick Start Guide
- MPC5554/5553微處理器揭秘
- 機器學(xué)習(xí)案例分析(基于Python語言)
- 設(shè)計模式
- Containerization with Ansible 2