Hi, I am new to Django (and python), and I have a question regarding database query stuff
Basic info - I have a category model and an article model, and each article is linked to a category through a foreign key If i have the following code --- category = Category.objects.all()[0] return HttpResponse(cat.article_set.count()) -- Will that return the count of all of the articles in the given category using a COUNT(*) query, or will it actually pull ALL of the articles from the database and get the size of the array? Basically i'm trying to figure out if im being efficient or just downright wasteful :) Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---