Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Inconsistent speed for query results

Discussion in 'Database Discussion' started by NestMan, Jun 27, 2016.

Tags:
  1. NestMan

    NestMan Active Member

    Joined:
    May 10, 2016
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Utah
    cPanel Access Level:
    Root Administrator
    What is the best way to troubleshoot why sometimes a query will return results in one second, while sometimes it will take over ten seconds? In fact, sometimes the webpage that makes use of the query will time out. I can understand if my query was poorly written and, if so, then it should consistently run slow. Right? I tail the Apache error log, looking for clues when this sporadic event happens, and it doesn't ever record anything when it does.

    Thank you!
     
  2. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    555
    Likes Received:
    16
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Twitter:
    There are a number of factors that could contribute to this. Server load, connections to the server, queries running, etc... So many variables.

    Keep mytop running when you're seeing slower queries. I bet you'll see quite a few queries there.

    Also, you may want to consider MariaDB over MySQL, and cache as much as you can, to ram, not disk
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice