- 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.
推薦閱讀
- Clojure Data Analysis Cookbook
- 大數(shù)據(jù)戰(zhàn)爭:人工智能時代不能不說的事
- Java實用組件集
- Hadoop 2.x Administration Cookbook
- WOW!Illustrator CS6完全自學(xué)寶典
- 計算機控制技術(shù)
- Arduino &樂高創(chuàng)意機器人制作教程
- Nginx高性能Web服務(wù)器詳解
- 單片機技術(shù)項目化原理與實訓(xùn)
- 經(jīng)典Java EE企業(yè)應(yīng)用實戰(zhàn)
- 機器學(xué)習(xí)案例分析(基于Python語言)
- 大數(shù)據(jù)素質(zhì)讀本
- 軟測之魂
- NetSuite ERP for Administrators
- BeagleBone Home Automation