Jump to content

Recommended Posts

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  :confused: )

Thanks

 

 

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.