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

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.

主站蜘蛛池模板: 茂名市| 云龙县| 蒙阴县| 黄大仙区| 沅江市| 陆河县| 万安县| 广汉市| 武隆县| 景洪市| 南宫市| 集安市| 临沭县| 广饶县| 内乡县| 诸暨市| 依兰县| 顺义区| 江达县| 甘洛县| 渑池县| 大新县| 铅山县| 神池县| 尼玛县| 芦溪县| 呼图壁县| 蓬安县| 手游| 沙坪坝区| 禄劝| 兴文县| 西宁市| 漳平市| 贵州省| 临汾市| 柳江县| 离岛区| 怀安县| 北宁市| 扶沟县|