In another thread (http://groups.google.com/group/django-users/
browse_thread/thread/2748cdf205b5cf3e/
e8fe5087748d3c43#e8fe5087748d3c43) I was told it's best to use the
Database Router to implement horizontal sharding.
But I can't figure out how to use the Database Router to do what i
want. The documentation doesn't contain a lot of info either.
I have a model "Tweet".
What I'd like to do is to shard Tweet into N different databases/
tables.
When I need to read/write a Tweet object, I want to look at the Tweet
author's userid, take modulo N of the id, and then depending on the
result, route the operation to one of the N databases/tables.
Is it possible to do that using the Database Router?
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment