November 2, 2015 at 2:34 am
Hi!
I have this scenario:
1 - table A with several columns (around 20), which usually are all filled with not NULL values;
2 - I need to save more columns related with the same table A, but in this second situation, there are only a few (2,3) columns in common and there are more 2,3 different columns that are filled, leaving the other 20 columns with NULL values;
My question is:
3 - What is the best practice or the solution with best performance to add this new columns:
a. add this new columns to table A, and when rows are inserted, all of the other columns (around 20) will have NULL values but I will have to query one table regarding the same 'subject'
b. create a new table (B) with the distinct columns and when rows are inserted, all the tables rows will be filled with values, but I will have to query 2 tables regarding the same 'subject'
Thanks!
November 2, 2015 at 8:30 am
Based on your vague description option B would be the preferred way to go.
November 3, 2015 at 6:34 am
Thanks for your opinion.
I also think that a second table is better than using the same table keeping sevral rows with NULL values.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply