nitromaster Posted August 27, 2009 Share Posted August 27, 2009 Hi all I have a facebook application. Basically the database part of it stores whatever photos user's have added to the app. I'm a total newb when it comes to php/mysql, can only do simple stuff. However the app has currently grown to just over 20k users, with phpmyadmin informing me there's 57,279 records added. I have no idea when this is going to be too big for me to handle (i am totally new to all this) Basically it's one table called "userphotos" 5 fields: id - bigint(20) profile_id - bigint(20) aid - bigint(20) owner - bigint(20) profile_type - varchar(20) latin1_swedish_ci None of the above null. I currently have my indexes like so Indexes: Keyname Type Cardinality Action Field profile INDEX 19094 profile_id I think this is right, because most of my queries are like (selecting from where that field = something) SELECT * FROM photos where profile_id='" . $profile_id . "' Should i worry about the increasing size of the database yet? or? (currently growing at 2-5k records a day i think) I've heard of slowdown/etc with large databases, but have no idea how long it's gonna be before i get to that stage. (I have no idea about any of this ) Thanks Quote Link to comment https://forums.phpfreaks.com/topic/172133-when-will-i-need-to-start-optimizing-my-db-and-stuff/ Share on other sites More sharing options...
abazoskib Posted August 27, 2009 Share Posted August 27, 2009 you should optimize regardless of how many users you have. use indexes on the information you are most likely to query and is also not a primary key. dont use select * unless you need every single field in that table. query the exact fields you need. other than that, without looking at your relations i cant say much more. if you have admin access, you could also play around with your mysql settings. show variables; will give you around 264 settings to play with. Quote Link to comment https://forums.phpfreaks.com/topic/172133-when-will-i-need-to-start-optimizing-my-db-and-stuff/#findComment-907670 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.