Results 1 to 4 of 4

Thread: Reduce waiting time

  1. #1
    Join Date
    Oct 2010
    Beans
    39

    Question Reduce waiting time

    Hello,

    I am trying to reduce waiting time for server. I tried to use both nginx and apache, but waiting is till the same. Please take a look at the picture:



    Please tell me how to reduce it. I am thinking problem is also related to MySQL.

    Thanks

  2. #2
    Join Date
    Nov 2007
    Location
    Newry, Northern Ireland
    Beans
    1,258

    Re: Reduce waiting time

    If changing the web server made little or no difference, I'd be looking elsewhere, either in your PHP code, or in the MySQL database design or query structure. I've never seen a server take 4 seconds to respond, even with highly complex databases and queries with multiple joins, so I'd look for error messages involving both PHP and MySQL first.

    Sorry I can't be of more help.
    Can't think of anything profound or witty.
    My Blog: http://gonzothegeek.blogspot.co.uk/

  3. #3
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    12,060
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Reduce waiting time

    Have you tested the performance of the queries you are using in PHP? Usually performance problems in SQL lies in poorly-indexed databases. Have you indexed every field in the database on which searches might be conducted? If you have SELECTs that employ multiple criteria, have you constructed the appropriate indexes using all the criteria?

    Use the command-line mysql client and run every query in the application against the database manually. Do some of them take a long time to execute? Check the indexing on those queries.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  4. #4
    Join Date
    Jul 2010
    Location
    Michigan, USA
    Beans
    2,132
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Reduce waiting time

    What does your YSlow grade look like in each category? I'm seeing a whole bunch of GET requests on that list (and I can't see all of it). Have you minified your Javascript, Sprited and minimized images, etc. Reducing the size and number of requests can have a MASSIVE impact on page loading speeds.

    You could look into your queries with MySQL EXPLAIN to ensure you have properly indexed fields, and the scope of your queries aren't grabbing a bunch of unnecessary items. Also, depending your your program, you may be doing individual queries for each dynamic object rather than rolling them into one single SELECT.
    Last edited by rubylaser; November 28th, 2012 at 05:18 PM.

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
  •