Subject | Long table or many tables? |
---|---|
Author | epedder |
Post date | 2009-10-09T06:56:36Z |
Hi all,
I've got a Firebird database design that we've used for a few years. It essentially holds large e-mail archives on a per-user basis. Currently we have a single table that stores each message in a row, and a field identifies the user. Most of the fields are indexed too.
The problem is that queries quickly become very slow as the data volume increases. It seems to me that it would make more sense to have a single table per user because there are no queries that span multiple users.
Does it make sense to do this if it results in several thousand tables or are there disadvantages in having many tables? I know that it is bad database design, but is there a practical reason in this case to uses a single table?
Thanks for your advice,
- Elric
I've got a Firebird database design that we've used for a few years. It essentially holds large e-mail archives on a per-user basis. Currently we have a single table that stores each message in a row, and a field identifies the user. Most of the fields are indexed too.
The problem is that queries quickly become very slow as the data volume increases. It seems to me that it would make more sense to have a single table per user because there are no queries that span multiple users.
Does it make sense to do this if it results in several thousand tables or are there disadvantages in having many tables? I know that it is bad database design, but is there a practical reason in this case to uses a single table?
Thanks for your advice,
- Elric