![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Sorry for my bad English. |
#3
| |||
| |||
|
|
I currently have two tables: 1: users id_user username 2: baned_users id_user i tought i could use something like this 1: users id_user username is_baned So would it be better to use two tables like in first example or one table like in second example? Offcourse, not many users would be baned (i hope). I currently have 59 joins with baned_users table in my stored procedures, two of those are executed on every access to the website (2xtop 20 users), what way should i use? |
#4
| |||
| |||
|
|
I currently have two tables: 1: users id_user username 2: baned_users id_user i tought i could use something like this 1: users id_user username is_baned So would it be better to use two tables like in first example or one table like in second example? Offcourse, not many users would be baned (i hope). I currently have 59 joins with baned_users table in my stored procedures, two of those are executed on every access to the website (2xtop 20 users), what way should i use? |
#5
| |||
| |||
|
|
Igor (jerosi... (AT) gmail (DOT) com) writes: I currently have two tables: 1: users id_user username 2: baned_users id_user i tought i could use something like this 1: users id_user username is_baned So would it be better to use two tables like in first example or one table like in second example? Offcourse, not many users would be baned (i hope). I currently have 59 joins with baned_users table in my stored procedures, two of those are executed on every access to the website (2xtop 20 users), what way should i use? The second design is the more natural design in my opinion. There could be situations where the first design is better for performance, if you often need to review the list of banned users, but that does not seem to be a critical task in this case. -- Erland Sommarskog, SQL Server MVP, esq... (AT) sommarskog (DOT) se Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books... Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx |
![]() |
| Thread Tools | |
| Display Modes | |
| |