Server load mysql versus a static include.

Discussion in 'Site & Server Administration' started by Colbyt, Mar 18, 2007.

  1. #1
    I am trying to figure out whether including static html on a php page has a lighter server load than pulling the same information from a database.

    Let's say a wordpress type cms site versus a site which includes a static header, footer, nav menu and pulls the article display from a static html file. Five includes vrs. howerever many db hits it would take to produce the same page.

    Which uses more server cpu, memory etc. ? How much more?
     
    Colbyt, Mar 18, 2007 IP
  2. MrX

    MrX Well-Known Member

    Messages:
    1,563
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    140
    #2
    Querying anything from the db will always be more intensive than doing static includes.
     
    MrX, Mar 18, 2007 IP
  3. WiredTree Zac

    WiredTree Zac Peon

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This is the truth.
     
    WiredTree Zac, Mar 19, 2007 IP
  4. nddb

    nddb Peon

    Messages:
    803
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Caching DB content is a pretty decent way to go, best of both worlds, so to speak.

    Update the cache when the DB changes, or however you want, but surfers will hit static content and lighten the load.
     
    nddb, Mar 19, 2007 IP
  5. plumsauce

    plumsauce Peon

    Messages:
    310
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Just a teeny addition here.

    If the db actually has to hit the physical disk. The additional work/time can be multiplied by a magnitude of thousands.

    .
     
    plumsauce, Mar 19, 2007 IP