On Thursday 09 March 2017 21:25:51 Web Architect wrote:
> I am a bit perplexed by this and not sure what the solution is.
> Following is the scenario:
>
> There is a Model A with 10000 records. Just a simple queryset -
> A.objects.all() is resulting in CPU hitting almost 100%.
What's the problem? You have a fast db, fast network and requesting 10k records into memory. Why would you want CPU usage to be lower so that it takes longer?
The question you need to ask yourself is why you need 10k records. Nobody's gonna read them all.
--
Melvyn Sopacua
No comments:
Post a Comment