久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <i id='el8h4'><tr id='el8h4'><dt id='el8h4'><q id='el8h4'><span id='el8h4'><b id='el8h4'><form id='el8h4'><ins id='el8h4'></ins><ul id='el8h4'></ul><sub id='el8h4'></sub></form><legend id='el8h4'></legend><bdo id='el8h4'><pre id='el8h4'><center id='el8h4'></center></pre></bdo></b><th id='el8h4'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='el8h4'><tfoot id='el8h4'></tfoot><dl id='el8h4'><fieldset id='el8h4'></fieldset></dl></div>
        <bdo id='el8h4'></bdo><ul id='el8h4'></ul>
      <tfoot id='el8h4'></tfoot><legend id='el8h4'><style id='el8h4'><dir id='el8h4'><q id='el8h4'></q></dir></style></legend>

      <small id='el8h4'></small><noframes id='el8h4'>

    1. 一臺(tái)服務(wù)器上的 MySQL 比另一臺(tái)服務(wù)器慢 10 倍

      MySQL 10x slower on one server compared to another(一臺(tái)服務(wù)器上的 MySQL 比另一臺(tái)服務(wù)器慢 10 倍)
      1. <i id='L9ZyB'><tr id='L9ZyB'><dt id='L9ZyB'><q id='L9ZyB'><span id='L9ZyB'><b id='L9ZyB'><form id='L9ZyB'><ins id='L9ZyB'></ins><ul id='L9ZyB'></ul><sub id='L9ZyB'></sub></form><legend id='L9ZyB'></legend><bdo id='L9ZyB'><pre id='L9ZyB'><center id='L9ZyB'></center></pre></bdo></b><th id='L9ZyB'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='L9ZyB'><tfoot id='L9ZyB'></tfoot><dl id='L9ZyB'><fieldset id='L9ZyB'></fieldset></dl></div>
          <tbody id='L9ZyB'></tbody>
        <tfoot id='L9ZyB'></tfoot>
        <legend id='L9ZyB'><style id='L9ZyB'><dir id='L9ZyB'><q id='L9ZyB'></q></dir></style></legend>
        1. <small id='L9ZyB'></small><noframes id='L9ZyB'>

            <bdo id='L9ZyB'></bdo><ul id='L9ZyB'></ul>

                本文介紹了一臺(tái)服務(wù)器上的 MySQL 比另一臺(tái)服務(wù)器慢 10 倍的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                問(wèn)題描述

                我有一個(gè)實(shí)時(shí)服務(wù)器和我的開發(fā)服務(wù)器,我發(fā)現(xiàn)我的 LIVE(不是開發(fā))服務(wù)器上的查詢運(yùn)行速度慢了 10 倍,即使實(shí)時(shí)服務(wù)器更強(qiáng)大,而且它們都是運(yùn)行可比負(fù)載.這不是數(shù)據(jù)庫(kù)結(jié)構(gòu)的事情,因?yàn)槲覍浞輳膶?shí)時(shí)服務(wù)器加載到我的開發(fā)服務(wù)器中.

                有人對(duì)我可以在哪里查找差異有任何想法嗎?它可能是一個(gè) MySQL 配置的東西嗎?我應(yīng)該從哪里開始尋找?

                實(shí)時(shí)服務(wù)器:

                <前>mysql> SELECT count(`Transaction`.`id`) 作為count, sum(`Transaction`.`amount`) 作為sum, sum(Transaction.citiq_margin+rounding + Transaction.citiq_margin_vat) 作為收入來(lái)自`transactions` AS `Transaction` LEFT JOIN `meters` AS `Meter` ON (`Transaction`.`meter_id` = `Meter`.`id`) LEFT JOIN `units` AS `Unit` ON (`Meter`.`unit_id` = `Unit`.`id`) WHERE (NOT (`Unit`.`building_id` IN ('1', '85')) AND NOT (`Transaction`.`state` >= 90)) AND DAY(`Transaction`.`created`) = DAY(NOW()) AND YEAR(`Transaction`.`created`) = YEAR(NOW()) AND (MONTH(`Transaction`.`created`)) = MONTH(NOW());+-------+---------+---------+|計(jì)數(shù) |總和 |收入|+-------+---------+---------+|第413話3638550 |409210 |+-------+---------+---------+1 排(2.62 秒)[root@mises ~]# 正常運(yùn)行時(shí)間17:11:57 55 天,1 分鐘,1 個(gè)用戶,平均負(fù)載:0.45、0.56、0.60

                開發(fā)服務(wù)器(由于備份有輕微的時(shí)間延遲,結(jié)果計(jì)數(shù)不同):

                <前>mysql> SELECT count(`Transaction`.`id`) 作為count, sum(`Transaction`.`amount`) 作為sum, sum(Transaction.citiq_margin+rounding + Transaction.citiq_margin_vat) 作為收入來(lái)自`transactions` AS `Transaction` LEFT JOIN `meters` AS `Meter` ON (`Transaction`.`meter_id` = `Meter`.`id`) LEFT JOIN `units` AS `Unit` ON (`Meter`.`unit_id` = `Unit`.`id`) WHERE (NOT (`Unit`.`building_id` IN ('1', '85')) AND NOT (`Transaction`.`state` >= 90)) AND DAY(`Transaction`.`created`) = DAY(NOW()) AND YEAR(`Transaction`.`created`) = YEAR(NOW()) AND (MONTH(`Transaction`.`created`)) = MONTH(NOW());+-------+---------+---------+|計(jì)數(shù) |總和 |收入|+-------+---------+---------+|第357話3005550 |338306 |+-------+---------+---------+1 排(0.22 秒)[www@smith 測(cè)試]$ 正常運(yùn)行時(shí)間18:11:53 up 12 days, 1:57, 4 users, load average: 0.91, 0.75, 0.62

                實(shí)時(shí)服務(wù)器(2 個(gè)至強(qiáng)四核):

                <前>處理器:7vendor_id : 正版英特爾CPU系列:6型號(hào) : 44型號(hào)名稱 : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz踏步:2CPU 兆赫:2395.000緩存大小:12288 KB物理 ID:0兄弟姐妹:8核心編號(hào):10CPU核心:4

                開發(fā)服務(wù)器(1 個(gè)四核)

                <前>處理器:3vendor_id : 正版英特爾CPU系列:6型號(hào) : 23型號(hào)名稱 : Intel(R) Core(TM)2 Quad CPU Q8300 @ 2.50GHz步數(shù):10微碼:0xa07CPU 兆赫:1998.000緩存大小:2048 KB物理 ID:0兄弟姐妹:4核心編號(hào):3CPU核心:4

                實(shí)時(shí)服務(wù)器:

                1. CentOS 5.7
                2. MySQL 5.0.95 版

                開發(fā)服務(wù)器:

                1. ArchLinux
                2. MySQL 5.5.25a 版

                解決方案

                因此,我在運(yùn)行 Centos、1 個(gè) CPU 和 512MB 內(nèi)存的虛擬機(jī)上運(yùn)行相同的數(shù)據(jù)庫(kù)和查詢:它在 0.3 秒內(nèi)提供了該查詢的答案;系統(tǒng)負(fù)載為 0.4 :/

                唯一真正的區(qū)別似乎是我在該服務(wù)器上運(yùn)行 Mysql 5.5.在我的案例中,從 Mysql 5.0 到 Mysql 5.5,似乎真的性能提高了 10 倍.

                我只有在將實(shí)時(shí)服務(wù)器從 Mysql 5.0 遷移到 Mysql 5.5 后才能確定,一旦完成,我將確認(rèn)結(jié)果.

                I have a live server and my dev server, and I am finding that queries on my LIVE (not dev) server run 10x slower, even though the live server is more powerful and they are both running comparable load. It's not a database structure thing because I load the backup from the live server into my dev server.

                Does anybody have any ideas on where I could look for the discrepancy? Could it be a MySQL config thing? Where should I start looking?

                Live Server:

                mysql> SELECT count(`Transaction`.`id`) as count, sum(`Transaction`.`amount`) as sum, sum(Transaction.citiq_margin+rounding + Transaction.citiq_margin_vat) as revenue FROM `transactions` AS `Transaction` LEFT JOIN `meters` AS `Meter` ON (`Transaction`.`meter_id` = `Meter`.`id`) LEFT JOIN `units` AS `Unit` ON (`Meter`.`unit_id` = `Unit`.`id`) WHERE (NOT (`Unit`.`building_id` IN ('1', '85')) AND NOT (`Transaction`.`state` >= 90)) AND DAY(`Transaction`.`created`) = DAY(NOW()) AND YEAR(`Transaction`.`created`) = YEAR(NOW()) AND (MONTH(`Transaction`.`created`)) = MONTH(NOW());
                +-------+---------+---------+
                | count | sum     | revenue |
                +-------+---------+---------+
                |   413 | 3638550 |  409210 |
                +-------+---------+---------+
                1 row in set (2.62 sec)
                
                [root@mises ~]# uptime
                 17:11:57 up 55 days, 1 min,  1 user,  load average: 0.45, 0.56, 0.60
                

                Dev Server (result count is different because of slight time delay from backup):

                mysql>  SELECT count(`Transaction`.`id`) as count, sum(`Transaction`.`amount`) as sum, sum(Transaction.citiq_margin+rounding + Transaction.citiq_margin_vat) as revenue FROM `transactions` AS `Transaction` LEFT JOIN `meters` AS `Meter` ON (`Transaction`.`meter_id` = `Meter`.`id`) LEFT JOIN `units` AS `Unit` ON (`Meter`.`unit_id` = `Unit`.`id`) WHERE (NOT (`Unit`.`building_id` IN ('1', '85')) AND NOT (`Transaction`.`state` >= 90)) AND DAY(`Transaction`.`created`) = DAY(NOW()) AND YEAR(`Transaction`.`created`) = YEAR(NOW()) AND (MONTH(`Transaction`.`created`)) = MONTH(NOW());
                +-------+---------+---------+
                | count | sum     | revenue |
                +-------+---------+---------+
                |   357 | 3005550 |  338306 |
                +-------+---------+---------+
                1 row in set (0.22 sec)
                
                [www@smith test]$ uptime
                 18:11:53 up 12 days,  1:57,  4 users,  load average: 0.91, 0.75, 0.62
                
                

                Live Server (2 x Xeon Quadcore):

                processor       : 7
                vendor_id       : GenuineIntel
                cpu family      : 6
                model           : 44
                model name      : Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz
                stepping        : 2
                cpu MHz         : 2395.000
                cache size      : 12288 KB
                physical id     : 0
                siblings        : 8
                core id         : 10
                cpu cores       : 4
                

                Dev Server (1 x Quadcore)

                processor       : 3
                vendor_id       : GenuineIntel
                cpu family      : 6
                model           : 23
                model name      : Intel(R) Core(TM)2 Quad CPU    Q8300  @ 2.50GHz
                stepping        : 10
                microcode       : 0xa07
                cpu MHz         : 1998.000
                cache size      : 2048 KB
                physical id     : 0
                siblings        : 4
                core id         : 3
                cpu cores       : 4
                

                Live Server:

                1. CentOS 5.7
                2. MySQL ver 5.0.95

                Dev Server:

                1. ArchLinux
                2. MySQL ver 5.5.25a

                解決方案

                So, I ran the same database and queries on a Virtual Machine running Centos, 1 CPU and 512MB of memory: it provides the answer to that query in 0.3 seconds; system load is 0.4 :/

                The only real difference seems to be that I am running Mysql 5.5 on that server. And it seems that there really is a 10x performance improvement in my case from Mysql 5.0 to Mysql 5.5.

                I will only know for sure once I have migrated my live servers from Mysql 5.0 to Mysql 5.5, I will confirm the results once I have done that.

                這篇關(guān)于一臺(tái)服務(wù)器上的 MySQL 比另一臺(tái)服務(wù)器慢 10 倍的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函數(shù)根據(jù) N 個(gè)先前值來(lái)決定接下來(lái)的 N 個(gè)行)
                reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用選擇表達(dá)式的結(jié)果;條款?)
                Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函數(shù)的 ignore 選項(xiàng)是忽略整個(gè)事務(wù)還是只是有問(wèn)題的行?) - IT屋-程序員軟件開發(fā)技
                Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 時(shí)出錯(cuò),使用 for 循環(huán)數(shù)組)
                pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 調(diào)用 o23.load 時(shí)發(fā)生錯(cuò)誤 沒有合適的驅(qū)動(dòng)程序)
                How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何將 Apache Spark 與 MySQL 集成以將數(shù)據(jù)庫(kù)表作為 Spark 數(shù)據(jù)幀讀取?)
                <legend id='5Fm4t'><style id='5Fm4t'><dir id='5Fm4t'><q id='5Fm4t'></q></dir></style></legend>
                    <bdo id='5Fm4t'></bdo><ul id='5Fm4t'></ul>

                      <i id='5Fm4t'><tr id='5Fm4t'><dt id='5Fm4t'><q id='5Fm4t'><span id='5Fm4t'><b id='5Fm4t'><form id='5Fm4t'><ins id='5Fm4t'></ins><ul id='5Fm4t'></ul><sub id='5Fm4t'></sub></form><legend id='5Fm4t'></legend><bdo id='5Fm4t'><pre id='5Fm4t'><center id='5Fm4t'></center></pre></bdo></b><th id='5Fm4t'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='5Fm4t'><tfoot id='5Fm4t'></tfoot><dl id='5Fm4t'><fieldset id='5Fm4t'></fieldset></dl></div>
                    • <small id='5Fm4t'></small><noframes id='5Fm4t'>

                          <tfoot id='5Fm4t'></tfoot>
                            <tbody id='5Fm4t'></tbody>
                        1. 主站蜘蛛池模板: 色久五月| 日韩欧美在线观看 | 激情视频一区 | 精品国产一区二区三区久久 | 国产精品爱久久久久久久 | 国产黄色av网站 | 欧美成人精品在线观看 | 亚洲一区二区视频 | 韩日一区二区 | 97国产在线观看 | 日本精品视频在线 | 欧美一级片在线播放 | 欧美日韩在线视频一区 | 久久国产欧美一区二区三区精品 | 97精品超碰一区二区三区 | 视频二区在线观看 | 欧美一二三 | 国产精品视频一区二区三区不卡 | 黄色一级大片在线免费看产 | 久久99精品久久 | 国产免费a视频 | 狠狠色狠狠色综合日日92 | 欧美日韩高清在线一区 | 免费观看黄网站 | 日韩中文在线 | 精品国产乱码久久久久久蜜退臀 | 国产综合在线视频 | 亚洲国产精品一区 | 久久一区二区免费视频 | 国产精品一区在线 | 久久久久九九九九 | 亚洲日本欧美 | 五月天婷婷综合 | 99久久婷婷国产精品综合 | 国产麻豆乱码精品一区二区三区 | 中文字幕亚洲精品在线观看 | 一级毛片免费完整视频 | 丁香久久 | 成人免费大片黄在线播放 | 日韩精品视频中文字幕 | 亚洲久久 |