Optimisation

Discussion in 'PHP' started by rochow, Apr 8, 2009.

  1. #1
    After finally being able to make things work, I'm starting to learn "best practices" rather than "yay it works! it'll do". One thing I'm always tightass on is optimisation.

    How do you guys test your PHP + SQL load time? I've found some classes, some of which had hundreds of files (wtf, that'll add seconds to my load time in itself). Surely there is an easy way! I have a start/end time by default in my coding which is a rough indication; however, it changes every time on refresh so its fairly vague and inconclusive.

    Interested to hear how you guys test :)
     
    rochow, Apr 8, 2009 IP
  2. Weirfire

    Weirfire Language Translation Company

    Messages:
    6,979
    Likes Received:
    365
    Best Answers:
    0
    Trophy Points:
    280
    #2
    If you use t he EXPLAIN function this can show you vital info about how queries operate and more importantly how efficient a particular solution is.

    I would recommend having a good read through this page;

    http://dev.mysql.com/doc/refman/5.0/en/optimization.html


    It will provide a wealth of information on what you're looking for. :)
     
    Weirfire, Apr 9, 2009 IP