Created
January 5, 2010 17:35
-
-
Save ryszard/269545 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: from petitions.models import * | |
In [4]: sum(p.signature_set.count() for p in Petition.objects.all()) | |
Out[4]: 1722 | |
In [5]: sum(p.signature_set.count() for p in Petition.objects.all()) | |
Out[5]: 1722 | |
In [6]: from django.db import connection, transaction | |
In [7]: cursor = connection.cursor() | |
In [8]: cursor.execute("select count(*) from petitions_blipuser_signed_petitions") | |
In [9]: signed = cursor.fetchone() | |
In [10]: signed | |
Out[10]: (1096L,) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment