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.

Heavy Load MYSQL

Discussion in 'Workarounds and Optimization' started by pktron, Feb 3, 2016.

  1. pktron

    pktron Registered

    Joined:
    Feb 3, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    Hi!!
    Im a newbie and i just bought a VPS with this specs
    RAM- 1GB SWAP-512MB SSD-75GB 1 CPU
    Im using it to develop something in php, and a wordpress.

    Right now im having a heavy load when i run this query on a search tool
    Code:
    SELECT *, CONCAT(
                    IFNULL(REPLACE(Nombre_ins,' ',''),''),
                    IFNULL(REPLACE(ApellidoP_ins,' ','') ,''),
                    IFNULL(REPLACE(ApellidoM_ins,' ','') ,''),
                    IFNULL(REPLACE(Matricula,' ','') ,'')) AS Buscar 
                FROM inscripciones_ulm
                LEFT JOIN ofertas_alumno ON inscripciones_ulm.Id_ins=ofertas_alumno.Id_alum
              
                HAVING Buscar LIKE '%carlos%'
                        AND tipo=1
                        AND Activo_oferta=1
                        AND Baja_ofe IS NULL
                        AND FechaCapturaEgreso IS NULL
                        AND IdCicloEgreso IS NULL
                        AND IdUsuEgreso IS NULL
                        AND inscripciones_ulm.Id_plantel=1
                        ORDER BY Id_ins DESC LIMIT 20
    
    im having 32 seconds!!
    
    this is mysql config
    [mysqld]
    performance-schema=0
    default-storage-engine=MyISAM
    key_buffer_size = 128M
    query_cache_size = 128M
    tmp_table_size = 64M
    innodb_buffer_pool_size = 16M
    innodb_additional_mem_pool_size = 2M
    innodb_log_buffer_size = 2M
    max_connections = 100
    sort_buffer_size = 4M
    read_buffer_size = 256K
    read_rnd_buffer_size = 512K
    join_buffer_size = 256K
    thread_stack = 256K
    binlog_cache_size = 500K
    max_user_connections = 100
    wait_timeout = 2403
    interactive_timeout = 200
    
    and right now im running Centos 6 64 bit
    mariaDB
    php 5.5
    FCGI
    suExec
    
    
    thanks a lot!
     
    #1 pktron, Feb 3, 2016
    Last edited by a moderator: Feb 4, 2016
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page