How to optimize PHP & MySql to speed up your site?

Discussion in 'PHP' started by mamaroach, Aug 18, 2008.

  1. #1
    Hello all,
    I'm trying to find out the solutions for my blog site optimization.
    I've optimized all images but it helps decreasing download time only 2 seconds.
    The database of my site is very big; Thailand-TravelOnline dot com.

    Any suggestion?
    Tnx.
     
    mamaroach, Aug 18, 2008 IP
  2. MartinGr

    MartinGr Peon

    Messages:
    38
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try to minimise the amount of queries to database. You could try Output buffering.
     
    MartinGr, Aug 18, 2008 IP
  3. rohan_shenoy

    rohan_shenoy Active Member

    Messages:
    441
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Google for 'optimizing PHP MySQL' applications
    or 'speed up PHP MYSQL applications'
     
    rohan_shenoy, Aug 18, 2008 IP
  4. m0nkeymafia

    m0nkeymafia Well-Known Member

    Messages:
    399
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    125
    #4
    I suggest running your queries through phpmyadmin and finding out how fast they go, then optimise any queries taking a long time. You can do this easily by adding indexes to your tables.
     
    m0nkeymafia, Aug 18, 2008 IP
  5. TheSyndicate

    TheSyndicate Prominent Member

    Messages:
    5,410
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    365
    #5
    If you want people from outside thailand move the server to outside thailand since the internet is thailand is so slow even servers
     
    TheSyndicate, Aug 18, 2008 IP
  6. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #6
    Yellowberry.org was the only one that got it right... to everyone else, despite the thread title, he wants the total page load time reduced, not the script execution time which is probably only a fraction of that time.

    - Compress images and use the most suitable format
    - Use GZip on most content, especially static/dynamic pages, images, CSS and JS (possibly the easiest and most efficient step)
    - Make sure content is loaded in the optimal order, scripts last, styles first.

    Yahoo's Developer centre has some nice notes about speeding up the process and I highly recommend Firebug and YSlow extensions for Firefox to profile your page load time.
     
    krt, Aug 18, 2008 IP
  7. alexme

    alexme Guest

    Messages:
    178
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Make sure that your mysql queries are only retrieving the fields that it needs to rather than doing a "select *" (meaning all) just ensure you are doing the minimal amount of retrieving that you can.

    Also, make sure you are running on a reasonable speed server, don't just worry about the bandwidth issue.

    My sites used to take a couple of seconds to generate pages when they were on a host with lots of sites, now that they're on our server they generate in "0.01 seconds" lol, nice and quick.
     
    alexme, Aug 19, 2008 IP
  8. vanny

    vanny Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    sir kya aap mujhe dynamic sitemap generate karna bta sakte ho
     
    vanny, Aug 20, 2008 IP
  9. mamaroach

    mamaroach Peon

    Messages:
    48
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Tnx every one ^ ^
     
    mamaroach, Nov 25, 2008 IP