TheFilmGod Posted May 12, 2007 Share Posted May 12, 2007 Hi, I have a question about mysql: I'm trying to create a website that will have complicated mysql. It will have user log in, and track a various elements of each user. (A LOT of different things). What is the best way to go around with this? Should I have a super huge table with everything? Or should I have multiple tables per user? I'm not worried about the amount of space the mysql takes up. I'm more worried about the effiency and how well the querying of the data works. I do not want future lag, even with a lot of traffic. So what would be the best structure of my site? Finally, my host says I can have "50 simultaneous connections for each user" (mysql) do you have any clue what that means? Quote Link to comment https://forums.phpfreaks.com/topic/51024-mysql-help/ Share on other sites More sharing options...
rygonet Posted May 12, 2007 Share Posted May 12, 2007 What do you mean? You are worried that mysql will crash if it tries to access 1 table with a large array of information? I wouldn't worry about it unless you are query overloading.. Quote Link to comment https://forums.phpfreaks.com/topic/51024-mysql-help/#findComment-251075 Share on other sites More sharing options...
ryeman98 Posted May 12, 2007 Share Posted May 12, 2007 I'd create a table and call it users and have all the user info. in there. Then make tables for anything else... That's how I'd do it anyway... Quote Link to comment https://forums.phpfreaks.com/topic/51024-mysql-help/#findComment-251076 Share on other sites More sharing options...
TheFilmGod Posted May 12, 2007 Author Share Posted May 12, 2007 What do you mean? You are worried that mysql will crash if it tries to access 1 table with a large array of information? I wouldn't worry about it unless you are query overloading.. No. It wouldn't crash over a large table, but over a LOT of requests!!! You see I predict (hope) this site will become popular. EAch page will require a mysql query. Now, I am worried it will crash, or give me a lag if there are soo many requests. So what is the best table structure. There would be many elements that would be added too. Like post count, and rep. stuff like that. I was thinking it would be easier for each user to have their own table for each set of stuff. Is this a good idea? I WILL SAY, THAT ONE TABLE, is completely unworkable. Quote Link to comment https://forums.phpfreaks.com/topic/51024-mysql-help/#findComment-251078 Share on other sites More sharing options...
ryeman98 Posted May 12, 2007 Share Posted May 12, 2007 No. It wouldn't crash over a large table, but over a LOT of requests!!! You see I predict (hope) this site will become popular. EAch page will require a mysql query. Now, I am worried it will crash, or give me a lag if there are soo many requests. So what is the best table structure. There would be many elements that would be added too. Like post count, and rep. stuff like that. I was thinking it would be easier for each user to have their own table for each set of stuff. Is this a good idea? I WILL SAY, THAT ONE TABLE, is completely unworkable. No, I'd say use a column for each different information for the user, not a whole new table, that could create lag because you'd have to call up a lot of tables. Quote Link to comment https://forums.phpfreaks.com/topic/51024-mysql-help/#findComment-251081 Share on other sites More sharing options...
TheFilmGod Posted May 12, 2007 Author Share Posted May 12, 2007 No, I'd say use a column for each different information for the user, not a whole new table, that could create lag because you'd have to call up a lot of tables. Okay, I see what you mean. But I'm a bit confused. If there are about 500 requests for that one table, wouldn't it cause more problems, then split it up between tables? Also, if there ever is a lag, how could I increase mysql performance? Quote Link to comment https://forums.phpfreaks.com/topic/51024-mysql-help/#findComment-251083 Share on other sites More sharing options...
ryeman98 Posted May 12, 2007 Share Posted May 12, 2007 Okay, I see what you mean. But I'm a bit confused. If there are about 500 requests for that one table, wouldn't it cause more problems, then split it up between tables? Also, if there ever is a lag, how could I increase mysql performance? Probably not. If a user has individual info, then you'd just be calling one table. If you want some other table, it wouldn't be completely user related so it wouldn't matter if there were 500 requests for a single table. You just need to make arrays that include calling up a certain table. If you're confused about that, I'll try to help describe it further... Quote Link to comment https://forums.phpfreaks.com/topic/51024-mysql-help/#findComment-251086 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.