Would it be faster...

Discussion in 'PHP' started by MCJim, Jun 16, 2008.

  1. #1
    Would it be faster/more efficient to generate something in a PHP script or to load it from a MySQL database?
    For example, lets use a math game. Would it be more efficient to:

    1. put a bunch of questions in a MySQL database and load it from there
    OR
    2. make a PHP script to generate math questions

    Thanks in advance!
     
    MCJim, Jun 16, 2008 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    2 is faster, coz there is no connection to mysql wich is also slowing down the process ;)

    But i'm not 100% shure, try it out! :)
     
    EricBruggema, Jun 16, 2008 IP
  3. joffer

    joffer Peon

    Messages:
    85
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Php is deffinetly faster , mysql is slower because of connection , selection etc. Offcourse mysql variant is highly customizable you can add a cool admin panel and itll be easier to add more questions etc.
     
    joffer, Jun 16, 2008 IP