0

I'm looking for a way to divide tables with logs of user actions in Django. The site features e-books, with reader and I need to track views in catalog, what users read and what they buy. I'm afraid that these tables might be too big to be useful.

For example Piwik analytics solves this with database tables where each one table corresponds to one month. I would like to do the same with Django. But as I can see there is no way to do it. Is there some similar way to Django ORM to accomplish this?

Lamp town guy
  • 1,489
  • 1
  • 16
  • 23
  • 2
    What's wrong with using indexes? – Ignacio Vazquez-Abrams Jul 11 '13 at 21:40
  • You should use an index (and/or some additional things like partitioning, depending on your DB). See for example this: http://stackoverflow.com/questions/16721772/mysql-performance-multiple-tables-vs-index-on-single-table-and-partitions The simplier solution the better. As for your question: you could try using some model factory (for example [django-factories](https://github.com/mirhampt/django-factories) looks interesting), however I imagine that maintaining such code would be horrible. – freakish Jul 11 '13 at 23:22

0 Answers0