Hi guys,
I am creating a table with around ten or eleven columns. I do know that it is absolutely wrong practise but I am not sure about this in my case because I have seven columns whose values are integers and will not be more than a thousand and others are varchars(45) which is its maximum value. I wonder whether it is better to separate them or leave them in the way they are.
Many columns
Moderator: General Moderators
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
However, knowing when to normalize (and when not to) is something to be aware of.Kieran Huggins wrote:There's nothing wrong with having eleven columns - you should have as many as your data warrants.
For example, if several columns are basically repeated such as user1, pass1; user2, pass2; etc, then it may be better to have a separate table for them. .. But it does depend on circumstance and usage some too.
Reply
I did some benchmarking and I got better results when my tables are separted.
feyd: I do not have cols like user1, pass1, user2, pass2, etc. They are not similar but despite this as I have already said I get better results with different ones.
Thank you guys.
feyd: I do not have cols like user1, pass1, user2, pass2, etc. They are not similar but despite this as I have already said I get better results with different ones.
Thank you guys.