- 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.
推薦閱讀
- Word 2003、Excel 2003、PowerPoint 2003上機(jī)指導(dǎo)與練習(xí)
- Instant Raspberry Pi Gaming
- 平面設(shè)計(jì)初步
- Getting Started with Clickteam Fusion
- 網(wǎng)頁(yè)編程技術(shù)
- 數(shù)據(jù)挖掘?qū)嵱冒咐治?/a>
- 工業(yè)機(jī)器人入門實(shí)用教程(KUKA機(jī)器人)
- 讓每張照片都成為佳作的Photoshop后期技法
- 大數(shù)據(jù)安全與隱私保護(hù)
- 21天學(xué)通Visual Basic
- AWS Certified SysOps Administrator:Associate Guide
- 大數(shù)據(jù)驅(qū)動(dòng)的設(shè)備健康預(yù)測(cè)及維護(hù)決策優(yōu)化
- MATLAB/Simulink權(quán)威指南:開發(fā)環(huán)境、程序設(shè)計(jì)、系統(tǒng)仿真與案例實(shí)戰(zhàn)
- PostgreSQL 10 Administration Cookbook
- Practical Big Data Analytics