jeudi 5 novembre 2015

Where should I store queryset.values_list for faster access?

Vote count: 0

I have a big model of around 3M rows, which is not changed frequently. I am trying to optimize the queries.

frequent queries are made on the model where the queries are finite and are repeated,

I want to store the values_list of the querysets to somewhere to search the objects faster.

Where is should I store the list?

The list looks something like this,

values = [u'value 0', u'value 1', u'value 2', u'value 3', ..., u'value n-1']

Should I use just the Django Cache framework or what could be the alternatives to store keys/values so searching can be faster?

Can accessing a cached queryset.values_list() be faster than generating the values_list on every request (my server takes around 0:00:00.002984)?

I have very little experience with external caching tools like redis, but with the django filesystem cache.

asked 1 min ago

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at

Where should I store queryset.values_list for faster access?

Aucun commentaire:

Enregistrer un commentaire