SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot TheTank's Avatar
    Join Date
    May 2003
    Location
    Houston, TX
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [MySQL] Multiple tables or divide into 2 databases

    I currently have a website that uses a MySQL database to store Site content with multiple queries per pages to multiple tables (over 200 but not all on 1 page call)

    I have 3 basic areasof the site:
    1) the main site content (displayed on every page)
    2) some advertising tables (every page) (specifically PHPadsnew)
    3) a chat module (not on every page)

    I'm just wondering if technically it makes since to subdivide these out into 2 - 3 databases. Will I see any performance problems either way?
    I think sometimes I dream in code.

  2. #2
    SitePoint Enthusiast geebee2's Avatar
    Join Date
    Mar 2004
    Location
    Gloucester UK
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why would you want to do that?

    Generally the whole idea of a database is to keep everything in one place. That avoids redundancy which is the enemy.

    My strong advise would be to keep it as one database.

    HTH,

  3. #3
    SitePoint Zealot TheTank's Avatar
    Join Date
    May 2003
    Location
    Houston, TX
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by geebee2
    Why would you want to do that?
    Please see this in my original response.

    Quote Originally Posted by TheTank
    Will I see any performance problems either way?
    I know alot about programming but not a lot about the technical aspects of a MySQL database.

    If I am averaging 100 online sessions (and growing) at one time, it seems logical to me that allowing the data to pull from 2 different sources may help site performance. But I don't know if it is a wash once you add in the overhead of generating a new database call.

    (BTW, this probably should be moved to the MySQL sub-forum)
    I think sometimes I dream in code.

  4. #4
    SitePoint Enthusiast geebee2's Avatar
    Join Date
    Mar 2004
    Location
    Gloucester UK
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    > Will I see any performance problems either way?

    I cannot really answer for MySql, but really it shouldn't make much difference. Having several databases is likely to marginally increase demand for resources, there is bound to be a certain amount of common overhead.

    But really I wouldn't let that influence you. Splitting a database can result in horrendous long term problems, it's just best not to go there! Sooner or later you are likely to have references between tables in different databases ( which usually means loss of checking for referential integrity etc.)

    Best regards,
    George

    http://qaaz.com

    For low cost database-driven web-sites


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •