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

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.

主站蜘蛛池模板: 隆回县| 宁河县| 康平县| 武夷山市| 广元市| 南部县| 微山县| 马公市| 腾冲县| 沙坪坝区| 丁青县| 赤城县| 铅山县| 淅川县| 石楼县| 崇文区| 武冈市| 平乡县| 禹州市| 大兴区| 嘉荫县| 旺苍县| 镶黄旗| 深水埗区| 沙河市| 乐安县| 获嘉县| 安顺市| 汉阴县| 舟山市| 新河县| 隆德县| 体育| 扎赉特旗| 鄂尔多斯市| 加查县| 金溪县| 鄂温| 乐陵市| 宜兴市| 阿拉尔市|