in reply to DBIx::Class with two kinds of otherwise identical table types
I can't answer your DBIx::Class question, as I've never used it. But I'm wondering why you want to split out your residents tables? It seems to me that it would simply make it harder to do useful queries. You could group your residents by putting an index on the town column for residents if you're trying to speed up access to groups of residents of a particular town.
If you're using a database that permits the use of partitioned tables, then you might consider partitioning your residents table. That way, typical queries could use the residents table and see all residents for all towns. But you could access the individual partitions of the table, if need be. In MS SQL Server, you have to build a partitioning function (to tell it which table a particular resident goes to) and it has other criteria (key monotonicity, etc.). I think you could do it with a key of (Town,ResidentID) or some such. I've not built a partitioned table in a while, so I'd have to hit the books again to be sure. But seeing as I'm going to bed (it's nearly 1:00AM here), I think I'll just cough up a couple links Google gave me, and you can review 'em to see if it looks interesting: Partitioned Tables and Indexes in SQL Server 2005 and SQL SERVER – 2005 – Database Table Partitioning Tutorial.
...roboticus
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: OT?: Partition the tables? (Re: DBIx::Class with two kinds of otherwise identical table types)
by dwm042 (Priest) on Sep 15, 2010 at 11:55 UTC | |
by roboticus (Chancellor) on Sep 15, 2010 at 13:11 UTC |