If your situation allows it, you could de-normalize and save the count result in a separate table. Then you need to adjust the count whenever you add / delete a row ofcourse.
If you're a database purist I might have made your stomach turn, however :) regards, Simon On Jun 7, 8:19 pm, Paul Rauch <[EMAIL PROTECTED]> wrote: > Is there a way to reduce execution time by counting objects? > > it's even splitted in two queries now, with only 2474487 entries ;) > > in django I use "model.objects.count()" > > SELECT COUNT(*) FROM "rainbowtables_hashes":34.552 > > SELECT COUNT(*) FROM "rainbowtables_hashes":31.024 > > greetz Paul Rauch --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---