

App Engine datastore tip: monotonically increasing values are bad - christianberg
http://ikaisays.com/2011/01/25/app-engine-datastore-tip-monotonically-increasing-values-are-bad/

======
candeira
I thought what was bad was monotonically increasing keys, not values.

The solution, assuming for instance that you are indexing by timestamp, and
your timestamp is a string: index by timestamp[::-1] (reverse the string).

Solved, next problem?

~~~
praptak
Yeah, now try to fetch records from a particular hour.

Seriously, it is better to get rid of timestamp indexing altogether instead of
having an index that is basically useless for anything but fetching an _exact_
timestamp.

~~~
candeira
The same problem exists for any monotonically increasing key, and the same
solution can be used. Sequential ids for events, whatever. The timestamp was
just an admittedly not very wise reuse of a not very good example.

