Friday, April 23, 2010

[Rails] Re: Best way to handle multiple tables to replace one big ta

Mike P. wrote:
> Hello,
>
> I've decided to use multiple tables for an entity (e.g. "todo_items1,"
> "todo_items2," "todo_items3," etc.), instead of just one main table
> which could end up having a lot of rows (e.g. just "todo_items"). I'm
> doing this to try and to avoid a potential future performance drop that
> could come with having too many rows in one table.

Robert already said it, and I agree: DO NOT DO THIS. Any decent DB
system is designed to handle tables in the millions of rows without
breathing hard. Just index your tables properly and make sure your
queries are efficient.

If you have to use your DB's sharding features at some point, go for it.
But don't even think of doing this in the app layer.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate