# Custom ordering of keys

**URL:** <https://forums.foundationdb.org/t/custom-ordering-of-keys/255>\
**Category:** Using FoundationDB\
**Created:** [April 24, 2018, 11:55pm UTC](https://forums.foundationdb.org/t/custom-ordering-of-keys/255 "2018-04-24T23:55:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nutjob](https://avatars.discourse-cdn.com/v4/letter/n/f1d935/32.png) [@nutjob](https://forums.foundationdb.org/u/nutjob)\
**Post date:** [April 24, 2018, 11:55pm UTC](https://forums.foundationdb.org/t/custom-ordering-of-keys/255/1 "2018-04-24T23:55:55Z")

</div>

There doesn’t seem to be an API (in C) to order keys other than “lexicographically”. Is this a feature or a bug?

Or have I perhaps missed it?

---

<div class="post-metadata">

**Author:** ![dave](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/dave/32/89_2.png) [@dave](https://forums.foundationdb.org/u/dave)\
**Post date:** [April 25, 2018, 12:00am UTC](https://forums.foundationdb.org/t/custom-ordering-of-keys/255/2 "2018-04-25T00:00:55Z")

</div>

It’s a feature. There’s very little that you can’t do reasonably efficiently by transforming keys such that the lexicographic order is what you want, and it keeps the distributed database simple and universal.
