[mirrorbrain-commits] [mod_stats] r56 - /trunk/downloadstats/stats/models.py

From: <poeml_at_mirrorbrain.org>
Date: Tue, 15 Dec 2009 00:22:23 -0000
Author: poeml
Date: Tue Dec 15 01:22:22 2009
New Revision: 56

URL: http://svn.mirrorbrain.org/viewvc/mod_stats?rev=56&view=rev
Log:
downloadstats app: add indexes; shorten the character fields somewhat

Modified:
    trunk/downloadstats/stats/models.py

Modified: trunk/downloadstats/stats/models.py
URL: http://svn.mirrorbrain.org/viewvc/mod_stats/trunk/downloadstats/stats/models.py?rev=56&r1=55&r2=56&view=diff
==============================================================================
--- trunk/downloadstats/stats/models.py (original)
+++ trunk/downloadstats/stats/models.py Tue Dec 15 01:22:22 2009
_at_@ -7,15 +7,15 @@
     # described in the proposal.
     #year = models.PositiveSmallIntegerField()
     #day = models.PositiveSmallIntegerField()
-    date = models.DateField()
+    date = models.DateField(db_index=True)
     
-    product = models.CharField(max_length=512)
+    product = models.CharField(max_length=256, db_index=True)
 
     # all these should probably called attr1, attr2, attr3, ...
-    osname = models.CharField(max_length=512)
-    version = models.CharField(max_length=32)
-    lang = models.CharField(max_length=32)
-    country = models.CharField(max_length=2)
+    osname = models.CharField(max_length=256, db_index=True)
+    version = models.CharField(max_length=32, db_index=True)
+    lang = models.CharField(max_length=32, db_index=True)
+    country = models.CharField(max_length=2, db_index=True)
 
     count = models.IntegerField(default=1)
 




_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Tue Dec 15 2009 - 00:22:24 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT