I've noticed in several hacks that it is common to modify the user table to add fields. This table already has a fairly large number of fields, and adding several hacks that increase this number just makes those queries that much longer.
Another approach is to create a separate table, and use a JOIN SQL query to get the data, yet that seems to be seldom used. Is there a reason that hacks don't add a new table rather than modifying the user table?
---
As an example, consider the common hack of making a user contribution table. The hacks here add donate fields. (I'd like to see an amount, a date, and a field indicating whether the user wishes to remain anonymous.) This modification of the user table adds the donate overhead for every user.
The second approach would be to add a new donation table with a few fields. The userid would be the primary key. If only 5% of your users are contributors, your donation table would be much, much smaller. And, the hack wouldn't affect the user table at all. This should be a safer way to hack vB, shouldn't it?
Are there performance considerations, or is it just simpler to add a few fields to the user table?
|