Reputation: 26597
I think instead of maintaining a single friendRelations table containing a list of relations of all users on my network it would be better to make a separate Relations table for each user on network, that contains profileIDs of all people & groups the user chooses to follow. This way retreival would be quite faster... any suggestions would be greatly appreciated...!!
Upvotes: 2
Views: 1130
Reputation: 1335
This seems like a drastic design decision to eliminate a problem that probably won't exist. Knowing very little about how your database is constructed and accessed, it's impossible to say whether this is a bad decision (probably) or if your business requirements are unique and this is the solution (unlikely). My recommendation would be to determine the level of normalization you need, and don't try to eliminate performance issues that don't yet exist.
Should I normalize my DB or not?
Upvotes: 0
Reputation: 1853
If you have performance issues with your database queries for retrieving information I strongly recomend you to use the Vertica database, which is incredibly fast.
Upvotes: -2
Reputation: 54306
Remember that databases are generally quite good at indexing (assuming you give them suitable columns to index) so retrieval for a specific user should be fast in any case. Creating a bazillion tables may be slower overall.
Upvotes: 5