SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Enthusiast moekilla's Avatar
    Join Date
    Jul 2001
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how many MYSQL dbs do i really need?

    ive been searching for a best company to host my site.. but then i found out that they offer only 3-4 mysql databases.. is this enough for a community website? do i really need more? thanks

  2. #2
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You really only need 1. You can have unlimited tables in each DB, and you can just edit the database name for apps to use.

    I've always wondered why hosts charged more for additional MySQL DBs...

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    United Kingdom
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm allowed 5 dbs. I use 1 for my forums, then another 1 for the rest of the site. So, at most you only really need 2.
    No one is a virgin, life screws us all

  4. #4
    SitePoint Enthusiast Ckeren's Avatar
    Join Date
    Jun 2001
    Location
    AU
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Normally use 2
    one is for actual transaction and the other one is for backup purposes only. So whenever the first one fail or corrupt get the second database.

  5. #5
    SitePoint Evangelist mad-onion's Avatar
    Join Date
    Aug 2000
    Location
    Land of the long white cloud
    Posts
    556
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Ckeren
    one is for actual transaction and the other one is for backup purposes only. So whenever the first one fail or corrupt get the second database.
    Hmmm interesting logic
    What about if someone accidentally deletes the mysql data directory on the webserver? All that really protects you from is mysql (or whatever db system it is) screwing itself which does happen but not much...i havent seen a case of that for months! It is best to keep a dump of all your dbs on a seperate system!

    Anyway 1 db is enough for pretty much anything (there may actually be a limit on how many tb's you can have). Seperate db's is for organisation more than anything! And also if you are running to prebuilt apps and two tables have the same name you will need to have more than one db..
    But really 2-5 is ample for pretty much any website!
    Last edited by mad-onion; Jul 11, 2001 at 01:29.
    SiteOptions >> Services :: Products :: Contact
    Developers of PHP, C++, Visual Basic, MySQL, and more!

  6. #6
    Node mutilating coot timnz's Avatar
    Join Date
    Feb 2001
    Location
    New Zealand
    Posts
    516
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also a little question here, if you had two quite big scripts that had biggish database's, or required lots of tables, running off the same database, would the "server load" be spread out more, or be better for the web server, if you had each of those database demanding scripts on separate database's or not?

    Because that could possibly be a reason for wanting up to 5 database's, if you had 3 or 4 "big" scripts requiring database interaction.

  7. #7
    SitePoint Evangelist mad-onion's Avatar
    Join Date
    Aug 2000
    Location
    Land of the long white cloud
    Posts
    556
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Timnz,
    no i dont think that would balance the load with mysql! Multiple tables would but not multiple dbs, tables are just a set of files and a db is just a folder with those files inside it...so you can probably see that there would be no difference if you had those files in ten folders or 1 folder...

    But maybe i am wrong
    SiteOptions >> Services :: Products :: Contact
    Developers of PHP, C++, Visual Basic, MySQL, and more!

  8. #8
    Node mutilating coot timnz's Avatar
    Join Date
    Feb 2001
    Location
    New Zealand
    Posts
    516
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok then, that seems perfectly logical, I was just wondering. If you are right then, do some hosting companies span their databases over multiple servers, because then the load would be spread out would it not, because the different databases would be on different boxes, if you somehow got each of them on different boxes!

    Hehe, I sound like some kind of load balancer, out to balance the load on servers world wide
    Not that I think I would ever strike this situation personally, but it is just nice to know.

  9. #9
    SitePoint Evangelist mad-onion's Avatar
    Join Date
    Aug 2000
    Location
    Land of the long white cloud
    Posts
    556
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hehe...once you get to the point were you are wanting to span your db's over multiple servers i think you can rest assured mysql is no longer going to make the grade on other levels!
    SiteOptions >> Services :: Products :: Contact
    Developers of PHP, C++, Visual Basic, MySQL, and more!

  10. #10
    Node mutilating coot timnz's Avatar
    Join Date
    Feb 2001
    Location
    New Zealand
    Posts
    516
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hehe, and here was me thinking that Oracle, Sybase, and MS SQL were all pieces of you know what

  11. #11
    SitePoint Enthusiast Ckeren's Avatar
    Join Date
    Jun 2001
    Location
    AU
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well what I think about database is that every time you try to connect it it will reserve some memory in register and send you the information that you want in condition where the connectin is establish successfully.

    Whereas if you try to open more than 2 databases this will logically reserved more memory(maybe double, it all depands on how big the table(s) is/are).

    About table:
    Since table is somehow already inside database it will take very little memory again to genereate the request.

    Therefore in my opinion opening one database is a good way to practice.

    After all this is just my brief opinion

  12. #12
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    from the manual:

    13.2.6 Drawbacks to Creating Large Numbers of Tables in the Same Database

    If you have many files in a directory, open, close, and create operations will be slow. ...
    i knew that when a directory has a lot of files operations on the files are going to be (in theory) slower. it's definitely not going to be faster. you'd have to be up into 1000s of tables before it'd be too slow, but i just wanted to point it out.

  13. #13
    SitePoint Enthusiast moekilla's Avatar
    Join Date
    Jul 2001
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thnks a lot guys... now... ummm... do you know some good companies that is reliable in MYSQL? i've been surfin for a month looking for a reliable host.. any suggestions? thanks


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
  •