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
https://forums.phpfreaks.com/topic/168423-huge-database-optimization/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.