posts - 495,  comments - 11,  trackbacks - 0

          tmp_table_size = 500mb //臨時表大小設(shè)置

          //指定用于索引的緩沖區(qū)大小,增加它可得到更好的索引處理性能。
          //對于內(nèi)存在4GB左右的服務(wù)器該參數(shù)可設(shè)置為256M或384M。
          //注意:該參數(shù)值設(shè)置的過大反而會是服務(wù)器整體效率降低!
          key_buffer_size = 384m

          sort_buffer_size = 17mb //排序緩存

          read_buffer_size=4m //讀取緩存

          table_cache=256 //表緩存

          ft_min_word_len //全文搜索

          query_cache_size 查詢緩存

          <?
          #!/bin/sh
          #######檢查mysql狀態(tài)
          PORT=`netstat -na | grep "LISTEN" | grep "3306" | awk '{print $4}' | awk -F. '{print $2}'`
          if [ "$PORT" -eq "3306" ]
          ??????? then
          #######檢查mysql占CPU負(fù)載
          ??????? mysql_cpu=`top -U root -b -n 1 | grep mysql | awk '{print $10}'|awk -F. '{print $1}'`
          ##如果mysql cpu負(fù)載大于80,則重啟mysql
          ??????? if [ "$mysql_cpu" -ge "80" ]
          ??????????????? then
          ??????????????? ps xww |grep 'bin/mysqld_safe' |grep -v grep | awk '{print $1}' | xargs kill -9
          ??????????????? ps xww |grep 'libexec/mysqld' |grep -v grep | awk '{print $1}' | xargs kill -9
          ??????????????? sleep 5
          ??????????????? /usr/local/mysql/bin/mysqld_safe --user=root > /dev/null &
          ??????? else
          ??????????????? exit 0
          ??????? fi
          else
          ???????? /usr/local/mysql/bin/mysqld_safe --user=root > /dev/null &
          fi
          ?>

          影響列數(shù): 4999 (查詢花費(fèi) 0.1756 秒)
          UPDATE `jobs_faces` SET postime = '1250784000' WHERE jid <505000 AND jid >500000

          jobs_faces字段
          字段 類型 整理 屬性 Null 默認(rèn) 額外 操作
          jid int(10)?? UNSIGNED 否? auto_increment??????????????
          oid int(10)?? UNSIGNED 否 0???????????????
          cid mediumint(8)?? UNSIGNED 否 0???????????????
          requests smallint(4)?? UNSIGNED 否 0???????????????
          views mediumint(6)?? UNSIGNED 是 0???????????????
          checked tinyint(1)?? UNSIGNED 否 0???????????????
          istoped tinyint(1)?? UNSIGNED 否 0???????????????
          postime int(10)?? UNSIGNED 否 0???????????????
          losetime int(10)?? UNSIGNED 否 0???????????????
          toped tinyint(1)?? UNSIGNED 否 0???????????????
          toptime int(10)?? UNSIGNED 否 0???????????????
          bold tinyint(1)?? UNSIGNED 否 0???????????????
          highlight varchar(7) gbk_chinese_ci? 否????????????????
          lightime int(10)?? UNSIGNED 否 0???????????????
          people smallint(4)?? UNSIGNED 否 0???????????????
          sex tinyint(1)?? UNSIGNED 否 0???????????????
          djobskinds varchar(30) gbk_chinese_ci? 否????????????????
          jname varchar(60) gbk_chinese_ci? 否

          影響列數(shù): 4999 (查詢花費(fèi) 0.2393 秒)
          UPDATE `jobs_faces` SET postime = '1250784000' WHERE jid <455000 AND jid >450000

          posted on 2011-08-13 15:45 jadmin 閱讀(122) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 株洲市| 溧水县| 三河市| 海伦市| 普宁市| 黄浦区| 通化县| 余庆县| 茶陵县| 玛纳斯县| 延边| 邹城市| 霍山县| 许昌市| 蕉岭县| 滦平县| 新宁县| 广河县| 义乌市| 新干县| 柳州市| 定襄县| 柳林县| 顺义区| 鸡东县| 金昌市| 大邑县| 怀安县| 乌拉特中旗| 磴口县| 乐至县| 阳谷县| 静宁县| 潜江市| 盘山县| 大英县| 堆龙德庆县| 祁连县| 应用必备| 宾阳县| 棋牌|