nims
nims

Reputation: 3871

A way to optimize reading from a datastore which updates once a day

I am running my Django site on appengine. In the datastore, there is an entity kind / table X which is only updated once every 24 hours.

X has around 15K entries and each entry is of form ("unique string of length <20", integer).

In some context, a user request involves fetching an average of 200 entries from X, which is quite costly if done individually.

What is an efficient way I can adopt in this situation?

Here are some ways I thought about, but have some doubts in them due to inexperience

The above are just what I could come up with in first thought. There must be ways I am unaware/missing.

Thanks.

Upvotes: 1

Views: 62

Answers (1)

voscausa
voscausa

Reputation: 11706

Your total amout of data is very small and looks like a dict. Why not save it (this object) as a single entry in the database or the blobstore and you can cache this entry.

Upvotes: 1

Related Questions