Re: How to use the Database Router?
> Ah - this is possibly the source of confusion. Django's Routers can
> shard to different databases, but not to different tables in the same
> database.
>
> Why do you want to shard into different *tables*? The usual
> interpretation of sharding (at least, the usual interpretation that
> *I'm* familiar with) is to shard into different *databases*. I'm not
> sure I see what you gain by using different tables in the same
> database.
>
I probably didn't make it clear.
I used the term "databases/tables" because (to me) if those tables
lives in different databases then they are different tables.
Anyway let me rephrase.
I have a model "Tweet". I want to shard it into N databases based on
the modulo N of the Tweet's author's id. So each database would have a
table "Tweet" with the exact same structure.
How do I do that with 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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home