Ad Widget

Collapse

Slow mysql queries

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • symfrog
    Junior Member
    • Oct 2009
    • 12

    #1

    Slow mysql queries

    Hi

    I am getting the following slow mysql queries logged by mysql from zabbix user. Can anyone help to sort this out? It seems to be leading to performance problems on the machine.


    /usr/sbin/mysqld, Version: 5.0.51a-3ubuntu5.4-log ((Ubuntu)). started with:
    Tcp port: 3306 Unix socket: /var/run/mysqld/mysqld.sock
    Time Id Command Argument
    # Time: 100220 6:40:21
    # User@Host: zabbix[zabbix] @ localhost []
    # Query_time: 15 Lock_time: 0 Rows_sent: 369 Rows_examined: 1109
    use zabbix;
    select i.itemid,i.hostid,h.proxy_hostid,i.type,i.data_typ e,i.value_type,i.key_,i.snmp_community,i.snmp_oid, i.snmp_port,i.snmpv3_securityname,i.snmpv3_securit ylevel,i.snmpv3_authpassphrase,i.snmpv3_privpassph rase,i.ipmi_sensor,i.delay,i.delay_flex,i.trapper_ hosts,i.logtimefmt,i.params,i.status,i.authtype,i. username,i.password,i.publickey,i.privatekey from items i,hosts h where i.hostid=h.hostid and h.status in (0) and i.status in (0,3) and i.itemid between 000000000000000 and 099999999999999 order by i.itemid;
    # User@Host: zabbix[zabbix] @ localhost []
    # Query_time: 27 Lock_time: 6 Rows_sent: 0 Rows_examined: 0
    update items set lastclock=1266647988,prevvalue=lastvalue,prevorgva lue=NULL,lastvalue='1266647741639.000000' where itemid=28125;
    # Time: 100220 6:40:22
    # User@Host: debian-sys-maint[debian-sys-maint] @ localhost []
    # Query_time: 22 Lock_time: 0 Rows_sent: 0 Rows_examined: 0
    # administrator command: Refresh;
Working...