Django and SQL question: Reduce number of database hits?

Unless you've profiled your app and know this is a serious bottleneck, I think you've got the answer: "just stressing too much.

Unless you've profiled your app and know this is a serious bottleneck, I think you've got the answer: "just stressing too much". You could fetch your data in a single ORM statement using Q objects... clients = Client.objects. Filter(Q(status='current')|Q(status='acquired')|Q(status='past')):30 ...but then you'd have all three statuses in one queryset, and probably wouldn't have ten of each, and you'd still have to separate them for your template.

1 Because of the limits set in the original query, I think that "stressing to much" is the correct answer. – Tom Leys Jul 14 '09 at 3:45 Thanks (I'd vote it up but I don't have enough rep). Since it's a small site, I don't think it'll be a big bottleneck.

– mjaz Jul 15 '09 at 1:49.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions