Jump to content

Huge database Optimization


Suchy

Recommended Posts

I am using fes databases on my site (few have only 1 table, the others have more tables).

This looks kind like this:

-- database          --              tables --

----------------------------------------

    people                                people

----------------------------------------

    grades                                grades

----------------------------------------

    geo                                    states

                                            cities

                                            counties

                                            districts

----------------------------------------

  info                                    position

                                            company

----------------------------------------

  other                                    photo

                                              video

 

The way the site works is like this:

You select a city, district, state ... from a map an a list of people associated are displayed (sql searches the people database for the right state_number, city_number ... and displays all the people it found, at the same time while each person is being displayed sql goes to the info database and searches for the position which matches the position_number.

 

So the results look kind like this:

- adam s.    - locksmith

- robert x.  - banker

- anna b.    - teacher

 

If you select someone you will see their profile. Again sql goes to other databases and gets info related to that person.

SQL goes through other database and selects all photos and videos (if any exists) associated with the right user. It also searches the grades database and selects all the grades left by others that match that persons_number

 

 

How should I optimize my database for best perfomance?

 

 

People table

peopleo.jpg

 

 

 

Position table

position.jpg

 

 

City table

citya.jpg

 

 

 

Grade table

grade.jpg

 

PS. I changes all the names here for security.

Link to comment
Share on other sites

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.