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

Efficient result ordering

It's quite common to want to retrieve a record set ordered by a particular field; for instance, a photo-sharing service will want to retrieve the most recent photographs in descending order of creation. Since sorting data on the fly is a fundamentally expensive operation, databases must keep information about record ordering persisted on disk in order to efficiently return results in order. In a relational database, this is one of the jobs of a secondary index.

In Cassandra, secondary indexes can't be used for result ordering, but tables can be structured such that rows are always kept sorted by a given column or columns, called clustering columns. Sorting by arbitrary columns at read time is not possible, but the capacity to efficiently order records in any way and to retrieve ranges of records based on this ordering is an unusually powerful capability for a distributed database.

主站蜘蛛池模板: 枣阳市| 黄浦区| 千阳县| 凤凰县| 田东县| 噶尔县| 石林| 湟源县| 荃湾区| 昌乐县| 抚州市| 晋州市| 佛冈县| 和龙市| 米脂县| 云安县| 苏州市| 图木舒克市| 水富县| 永川市| 扎赉特旗| 梧州市| 哈密市| 固镇县| 垣曲县| 十堰市| 佛坪县| 洪洞县| 桦南县| 广州市| 西平县| 张家界市| 南雄市| 茶陵县| 田林县| 都匀市| 宜都市| 沾化县| 九江市| 松潘县| 鄂托克前旗|