• My server running very slow because of the following queries

    # Query_time: 14.068305  Lock_time: 0.000048 Rows_sent: 1  Rows_examined: 230475
        SET timestamp=1390423432;
        select meta_key from wp_postmeta where meta_key like '_wp_page_template' and meta_value like 'page-youtube.php';
        # User@Host: wwwarabu_Pr3eS[wwwarabu_Pr3eS] @ localhost []
        # Query_time: 8.108161  Lock_time: 0.000042 Rows_sent: 33  Rows_examined: 33
        SET timestamp=1390423432;
        SELECT user_id, meta_key, meta_value FROM wp_usermeta WHERE user_id IN (13);
        # User@Host: wwwarabu_Pr3eS[wwwarabu_Pr3eS] @ localhost []
        # Query_time: 8.317988  Lock_time: 0.000044 Rows_sent: 2  Rows_examined: 2
        SET timestamp=1390423432;
        SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (53760);
        # User@Host: wwwarabu_Pr3eS[wwwarabu_Pr3eS] @ localhost []
        # Query_time: 8.421612  Lock_time: 0.000089 Rows_sent: 0  Rows_examined: 0
        SET timestamp=1390423432;
        SELECT option_value FROM wp_options WHERE option_name = 'solostream_site_logo_height' LIMIT 1;
        # Time: 140122 15:43:53
        # User@Host: wwwarabu_Pr3eS[wwwarabu_Pr3eS] @ localhost []
        # Query_time: 7.467127  Lock_time: 0.000097 Rows_sent: 1  Rows_examined: 1
        SET timestamp=1390423433;
        SELECT   wp_posts.* FROM wp_posts  WHERE 1=1  AND wp_posts.ID = 39709 AND wp_posts.post_type = 'post'  ORDER BY wp_posts.post_date DESC;
        # Time: 140122 15:43:54
        # User@Host: wwwarabu_Pr3eS[wwwarabu_Pr3eS] @ localhost []
        # Query_time: 6.187911  Lock_time: 0.000083 Rows_sent: 0  Rows_examined: 230475
        SET timestamp=1390423434;
        select meta_key from wp_postmeta where meta_key like '_wp_page_template' and meta_value like 'page-tabbed-cat.php';
        # User@Host: wwwarabu_Pr3eS[wwwarabu_Pr3eS] @ localhost []
        # Query_time: 10.592982  Lock_time: 0.000086 Rows_sent: 0  Rows_examined: 230475
        SET timestamp=1390423434;
        select meta_key from wp_postmeta where meta_key like '_wp_page_template' and meta_value like 'page-portfolio.php';
        # User@Host: wwwarabu_Pr3eS[wwwarabu_Pr3eS] @ localhost []
        # Query_time: 5.840021  Lock_time: 0.000049 Rows_sent: 2  Rows_examined: 2
        SET timestamp=1390423434;
        SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (53760);
        # Time: 140122 15:43:55
        # User@Host: wwwarabu_Pr3eS[wwwarabu_Pr3eS] @ localhost []
        # Query_time: 50.142776  Lock_time: 0.000069 Rows_sent: 0  Rows_examined: 230466
        SET timestamp=1390423435;
        select meta_key from wp_postmeta where meta_key like '_wp_page_template' and meta_value like 'page-tabbed-archive.php';
        # User@Host: wwwarabu_Pr3eS[wwwarabu_Pr3eS] @ localhost []
        # Query_time: 11.130057  Lock_time: 0.000039 Rows_sent: 0  Rows_examined: 230475
        SET timestamp=1390423435;
        select meta_key from wp_postmeta where meta_key like '_wp_page_template' and meta_value like 'page-portfolio.php';
        # User@Host: wwwarabu_Pr3eS[wwwarabu_Pr3eS] @ localhost []
        # Query_time: 49.739404  Lock_time: 0.000053 Rows_sent: 0  Rows_examined: 230466
        SET timestamp=1390423435;
        select meta_key from wp_postmeta where meta_key like '_wp_page_template' and meta_value like 'page-tabbed-cat.php';
        # User@Host: wwwarabu_Pr3eS[wwwarabu_Pr3eS] @ localhost []
        # Query_time: 11.111572  Lock_time: 0.000035 Rows_sent: 0  Rows_examined: 230475
        SET timestamp=1390423435;
        select meta_key from wp_postmeta where meta_key like '_wp_page_template' and meta_value like 'page-tabbed-cat.php';
        # User@Host: wwwarabu_Pr3eS[wwwarabu_Pr3eS] @ localhost []
        # Query_time: 5.840131  Lock_time: 0.000038 Rows_sent: 0  Rows_examined: 230475
        SET timestamp=1390423435;
        select meta_key from wp_postmeta where meta_key like '_wp_page_template' and meta_value like 'page-portfolio.php';

    My server Details

    root@sawa4 [/]# free -m
                     total       used       free     shared    buffers     cached
        Mem:          8192       4829       3362          0          0          0
        -/+ buffers/cache:       4829       3362
        Swap:            0          0          0
        root@sawa4 [/]# uname -r
        2.6.18-348.4.1.el5.028stab107.1
        root@sawa4 [/]# cat /etc/redhat-release
        CentOS release 5.10 (Final)
        root@sawa4 [/]# cat /etc/my.cnf
        [mysqld]
        local-infile=0
        skip-networking
        innodb_file_per_table=1
        max_allowed_packet = 100M
        interactive_timeout=60
        connect_timeout=20
        wait_timeout=60
    
        long_query_time=5
        log-slow-queries=/var/log/slow.log
    
        open_files_limit=7306
        [mysqld_safe]
        log-error=/var/log/mysqld.log
        pid-file=/var/run/mysqld/mysqld.pid
        nice = -10

    I want to know what cause this slow queries and how could i resolve it

  • The topic ‘Help High Mysql Load Slow Queries’ is closed to new replies.