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

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.

主站蜘蛛池模板: 沁水县| 门头沟区| 乐陵市| 滦平县| 滕州市| 渑池县| 鄄城县| 永平县| 潼关县| 图片| 台北县| 临朐县| 宝丰县| 漳平市| 海盐县| 潢川县| 兴山县| 漠河县| 绥德县| 景泰县| 峨山| 滦平县| 高雄县| 军事| 双柏县| 始兴县| 邯郸市| 西畴县| 金坛市| 巩留县| 道真| 郁南县| 建昌县| 龙川县| 柘荣县| 九寨沟县| 化德县| 防城港市| 永和县| 上高县| 陇西县|