Model to wrap many Active Record Models

Are your concerns just that or are they backed by measurements? To me, it looks like you're working against your DBMS, in particular when you run essentially the same query multiple times. If you insist on doing this, ActiveRecord doesn't help much. There are, as far as I can tell, two equally unattractive ways to achieve what you're looking for within the confines of AR:

(1) Use the usual #find on each individual table and write Ruby code taht combines the results. I'd expect this to be rather slow.

(2) Manually write the SQL (probably consisting of UNIONized subqueries) and execute it using #find_by_sql.

First and foremost, you ought to make sure that it really gives an advantage if you partition your data. Then, if you know that you can't avoid it, have a look what your DBMS offers to facilitate this. For instance, PostgreSQL 8.1 can use views and rules to give the impression of a single logical table where there are many [*]. That way, you keep storage details out of your Rails app.


[*] PostgreSQL: Documentation: 8.1: Partitioning