The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Optimize SQL query

Discussion in 'Database Discussions' started by mahdy_sharifi, Nov 25, 2013.

  1. mahdy_sharifi

    mahdy_sharifi Well-Known Member

    Joined:
    Feb 26, 2012
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi :

    How Can optimize Slow query ? for example we have any slow query on our server but how can optimize it ?

    Code:
    # Query_time: 10.734189  Lock_time: 0.000084 Rows_sent: 1  Rows_examined: 656958
    SET timestamp=1385379910;
    SELECT COUNT(c.c_id) AS confirmed, (SELECT COUNT(p.post_id) FROM nuke_bb3posts AS p WHERE (p.post_id = '5462281' AND p.poster_id = '1')) AS allowconfirm FROM nuke_bb3c
    onfirms AS c WHERE (c.post_id = '5462281' AND c.confirmer_id = '1');
    Thank You
     
  2. MikeDVB

    MikeDVB Well-Known Member
    PartnerNOC

    Joined:
    Jun 4, 2008
    Messages:
    212
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Indiana, USA
    I would advise you to get with the script developer for assistance on optimizing their SQL Queries.
     
  3. mahdy_sharifi

    mahdy_sharifi Well-Known Member

    Joined:
    Feb 26, 2012
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    for every SLOW query should get help from script developer ?
     
  4. MikeDVB

    MikeDVB Well-Known Member
    PartnerNOC

    Joined:
    Jun 4, 2008
    Messages:
    212
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Indiana, USA
    cPanel isn't generating the queries - cPanel is just a control panel.

    For example - if you were to uninstall the script - you will see no more slow queries from it even though cPanel is still installed and working.

    In short - contact the script developer responsible for crafting the query and not the control panel that runs on the server.

    Hopefully this makes sense for you.
     
Loading...

Share This Page