I want to keep a large ordered list (millions of elements) in Google App Engine datastore. Fast insertion is required.
The simplest way would be adding an indexed proper
You could make a giant linked-list.... with each entity pointing to the next one in the list.
It would be extremely slow to traverse the list later, but that might be acceptable depending on how you are using the data, and inserting into the list would only ever be two datastore writes (one to update the insertion point and one for your new entity).
In the database, your linked list can be done like this:
value (PK) predecessor
------------------------
A null
B A
C B
then when you insert new data, change the predecessor:
value (PK) predecessor
------------------------
A null
B A
C D
D B
Inserting is quick, but traversing will be slow indeed!