jagoan-neon Posted November 21, 2008 Share Posted November 21, 2008 I need to make a lot of field inside 1 table, let say hundreds or more.... Is it safe? Wise? I mean will it significantly slow down my server? Thank you Quote Link to comment https://forums.phpfreaks.com/topic/133619-solved-is-it-safe-or-wise-to-make-a-lot-of-filed/ Share on other sites More sharing options...
gnawz Posted November 21, 2008 Share Posted November 21, 2008 As of MySQL 5, These are the details: Max DB size: Unlimited Max Table Size: 2 GB (Win32 FAT32) to 16 TB (Solaris) Max Row Size: Max row size Max Columns per row: 3398 Max CHAR Size: 64 KB (text) Min Date: 64 bits Max Blob/Clob size: 4 GB (longtext, longblob) Min Date: 1000 Max Date: 9999 I think this should very well answer you, otherwise you can get back for any clarification. I'm sure your database wouldn't be bigger than the Swedish defense deprtment or BBC who use MySQL and SQL extensively. However, it is important to know what application you're handling.....MySQl may not be the best option. Quote Link to comment https://forums.phpfreaks.com/topic/133619-solved-is-it-safe-or-wise-to-make-a-lot-of-filed/#findComment-695233 Share on other sites More sharing options...
Mchl Posted November 21, 2008 Share Posted November 21, 2008 Here's some more Quote Link to comment https://forums.phpfreaks.com/topic/133619-solved-is-it-safe-or-wise-to-make-a-lot-of-filed/#findComment-695236 Share on other sites More sharing options...
fenway Posted November 21, 2008 Share Posted November 21, 2008 Why do you think you need so many? Quote Link to comment https://forums.phpfreaks.com/topic/133619-solved-is-it-safe-or-wise-to-make-a-lot-of-filed/#findComment-695741 Share on other sites More sharing options...
jagoan-neon Posted November 22, 2008 Author Share Posted November 22, 2008 For each of my member need unique id linked to other member. Thats way, i know who is closer to others. Thanks for all your help, i have a small database compared to BBC. Thank you all Quote Link to comment https://forums.phpfreaks.com/topic/133619-solved-is-it-safe-or-wise-to-make-a-lot-of-filed/#findComment-696077 Share on other sites More sharing options...
Mchl Posted November 22, 2008 Share Posted November 22, 2008 You certainly don't need ultra wide table for that. Rather than that, you need two tables. Quote Link to comment https://forums.phpfreaks.com/topic/133619-solved-is-it-safe-or-wise-to-make-a-lot-of-filed/#findComment-696113 Share on other sites More sharing options...
jagoan-neon Posted November 22, 2008 Author Share Posted November 22, 2008 (Now the topic marked as not solved) How to do that? Mysql is the only database i learned, but I'm still new to this. This is my field id | user | pass | phone | other_user1 | other_user2 | other_user3 | other_user 4 | ... | user n 1 | john | enter| 0812344 | 0 | 5 | 4 | 14 | ... | n other_user1,2, 3, ... is phone number of each users the real field id | user | pass | phone | 0812345 | 0812346 | 0812347 | 0812348 | 0812349 1 | john | enter | 0812344 | 0 | 5 | 4 | 14 | 1 The value inside each phone number is how many times user "john" received sms. So, 0812346 has sent 5 SMS to "john" or 0812348 has sent 14 times When there is a new phone number, it will added to the field, thats why I will have hundreds of field. Do you see any inefficiency the way I build my table? Or maybe there is a better way Thank you very much for replying. Quote Link to comment https://forums.phpfreaks.com/topic/133619-solved-is-it-safe-or-wise-to-make-a-lot-of-filed/#findComment-696186 Share on other sites More sharing options...
Mchl Posted November 22, 2008 Share Posted November 22, 2008 Yes, there is better way. Create another table like this table user_contacts phone1, phone2, contacts 0812344,0812345,0 0812344,0812346,5 0812344,0812347,4 0812344,0812348,14 0812344,0812348,1 ... Makes sense? Or even better table user_contacts user1ID, user2ID, contacts 1,2,0 1,3,5 1,4,4 1,5,14 1,6,1 ... Quote Link to comment https://forums.phpfreaks.com/topic/133619-solved-is-it-safe-or-wise-to-make-a-lot-of-filed/#findComment-696199 Share on other sites More sharing options...
jagoan-neon Posted November 23, 2008 Author Share Posted November 23, 2008 Man... you're great... I'll use your code. Thank you very much. Quote Link to comment https://forums.phpfreaks.com/topic/133619-solved-is-it-safe-or-wise-to-make-a-lot-of-filed/#findComment-696598 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.