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

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.

主站蜘蛛池模板: 门源| 浪卡子县| 平远县| 康定县| 清流县| 香港 | 宁陕县| 东阳市| 冕宁县| 阿尔山市| 剑川县| 铁力市| 万盛区| 仁寿县| 岳普湖县| 卓尼县| 南靖县| 双流县| 疏附县| 清远市| 旬阳县| 荆州市| 贺兰县| 昌图县| 长沙市| 自贡市| 博野县| 井冈山市| 五家渠市| 延寿县| 南安市| 铜陵市| 大足县| 芮城县| 稷山县| 贡嘎县| 成都市| 文成县| 兴化市| 西和县| 六安市|