官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 贺州市| 扶绥县| 谷城县| 越西县| 昂仁县| 泰和县| 棋牌| 桐城市| 肃南| 安泽县| 雷州市| 巴林左旗| 汝南县| 江城| 池州市| 平塘县| 黔南| 建德市| 平江县| 岑巩县| 大荔县| 麻栗坡县| 枣庄市| 松潘县| 旬阳县| 定安县| 易门县| 中卫市| 海南省| 商城县| 呼玛县| 营口市| 伊通| 望谟县| 正阳县| 麦盖提县| 清远市| 昌邑市| 拜城县| 梨树县| 页游|