Welcome Guest, Not a member yet? Register   Sign In
Some interesting Questions...
#1

[eluser]flyenig[/eluser]
Lets say you have a database table name "users" and in users u have 50 DB tables. if you query "users" to look for a certain user, will the queries be slower since there is 50 DB fields? If it is slower, will it be noticeable? and What is considered too much?

AND.....

If you go on facebook, and you go to notifications you can manage which type of notifications you want to receive by email. You have a lot of options. (like more then 30)
For example, you can manage emails that will send to you when someone sends you a message, or comments on your post or sends you a friend request etc. How do they do it? Do they store all those options in separate fields in the "users" table that already has the basic 20 fields? Or is that in a separate table?
#2

[eluser]WanWizard[/eluser]
The number of fields in a record doesn't really have any speed impact.
Just make sure your tables are indexed properly. Some RDBMS see a slight speed improvement if you only use fixed-length fields (i.e. no VARCHAR).

I don't know how facebook does it, but I use an options table that lists all the possible options, and I have a table that holds the user_id, the options_id, and the options_value, which you query using a join.
#3

[eluser]flyenig[/eluser]
Oh ok i see. Thanks for the Info

and Yea i was thinking of doing an something similar to your options table




Theme © iAndrew 2016 - Forum software by © MyBB