pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

      <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="muayew2" 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. 一臺服務器上的 MySQL 比另一臺服務器慢 10 倍

      MySQL 10x slower on one server compared to another(一臺服務器上的 MySQL 比另一臺服務器慢 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="kqomo20" 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>

                本文介紹了一臺服務器上的 MySQL 比另一臺服務器慢 10 倍的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我有一個實時服務器和我的開發服務器,我發現我的 LIVE(不是開發)服務器上的查詢運行速度慢了 10 倍,即使實時服務器更強大,而且它們都是運行可比負載.這不是數據庫結構的事情,因為我將備份從實時服務器加載到我的開發服務器中.

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

                實時服務器:

                <前>mysql> SELECT count(`Transaction`.`id`) 作為count, sum(`Transaction`.`amount`) 作為sum, sum(Transaction.citiq_margin+rounding + Transaction.citiq_margin_vat) 作為收入來自`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());+-------+---------+---------+|計數 |總和 |收入|+-------+---------+---------+|第413話3638550 |409210 |+-------+---------+---------+1 排(2.62 秒)[root@mises ~]# 正常運行時間17:11:57 55 天,1 分鐘,1 個用戶,平均負載:0.45、0.56、0.60

                開發服務器(由于備份有輕微的時間延遲,結果計數不同):

                <前>mysql> SELECT count(`Transaction`.`id`) 作為count, sum(`Transaction`.`amount`) 作為sum, sum(Transaction.citiq_margin+rounding + Transaction.citiq_margin_vat) 作為收入來自`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());+-------+---------+---------+|計數 |總和 |收入|+-------+---------+---------+|第357話3005550 |338306 |+-------+---------+---------+1 排(0.22 秒)[www@smith 測試]$ 正常運行時間18:11:53 up 12 days, 1:57, 4 users, load average: 0.91, 0.75, 0.62

                實時服務器(2 個至強四核):

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

                開發服務器(1 個四核)

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

                實時服務器:

                1. CentOS 5.7
                2. MySQL 5.0.95 版

                開發服務器:

                1. ArchLinux
                2. MySQL 5.5.25a 版

                解決方案

                因此,我在運行 Centos、1 個 CPU 和 512MB 內存的虛擬機上運行相同的數據庫和查詢:它在 0.3 秒內提供了該查詢的答案;系統負載為 0.4 :/

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

                我只有在將實時服務器從 Mysql 5.0 遷移到 Mysql 5.5 后才能確定,一旦完成,我將確認結果.

                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.

                這篇關于一臺服務器上的 MySQL 比另一臺服務器慢 10 倍的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                相關文檔推薦

                How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函數根據 N 個先前值來決定接下來的 N 個行)
                reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用選擇表達式的結果;條款?)
                Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函數的 ignore 選項是忽略整個事務還是只是有問題的行?) - IT屋-程序員軟件開發技
                Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 時出錯,使用 for 循環數組)
                pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 調用 o23.load 時發生錯誤 沒有合適的驅動程序)
                How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何將 Apache Spark 與 MySQL 集成以將數據庫表作為 Spark 數據幀讀取?)
                <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="yg22ag2" 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. 主站蜘蛛池模板: 阳光1号桔柚_无核沃柑_柑橘新品种枝条苗木批发 - 苧金网 | 旗杆生产厂家_不锈钢锥形旗杆价格_铝合金电动旗杆-上海锥升金属科技有限公司 | 行吊_电动单梁起重机_双梁起重机_合肥起重机_厂家_合肥市神雕起重机械有限公司 | 医养体检包_公卫随访箱_慢病随访包_家签随访包_随访一体机-济南易享医疗科技有限公司 | 杭州营业执照代办-公司变更价格-许可证办理流程_杭州福道财务管理咨询有限公司 | 上海公司注册-代理记账-招投标审计-上海昆仑扇财税咨询有限公司 上海冠顶工业设备有限公司-隧道炉,烘箱,UV固化机,涂装设备,高温炉,工业机器人生产厂家 | 风电变桨伺服驱动器-风电偏航变桨系统-深圳众城卓越科技有限公司 | 广州展台特装搭建商|特装展位设计搭建|展会特装搭建|特装展台制作设计|展览特装公司 | 瑞典Blueair空气净化器租赁服务中心-专注新装修办公室除醛去异味服务! | 长信科技产业园官网_西安厂房_陕西标准工业厂房 | 上海公众号开发-公众号代运营公司-做公众号的公司企业服务商-咏熠软件 | 新能源汽车电池软连接,铜铝复合膜柔性连接,电力母排-容发智能科技(无锡)有限公司 | 阜阳在线-阜阳综合门户 | 协议书_协议合同格式模板范本大全 | 佛山市钱丰金属不锈钢蜂窝板定制厂家|不锈钢装饰线条|不锈钢屏风| 电梯装饰板|不锈钢蜂窝板不锈钢工艺板材厂家佛山市钱丰金属制品有限公司 | 液压油缸生产厂家-山东液压站-济南捷兴液压机电设备有限公司 | 罗茨真空机组,立式无油往复真空泵,2BV水环真空泵-力侨真空科技 | 赛尔特智能移动阳光房-阳光房厂家-赛尔特建筑科技(广东)有限公司 | 发电机组|柴油发电机组-批发,上柴,玉柴,潍柴,康明斯柴油发电机厂家直销 | 仿清水混凝土_清水混凝土装修_施工_修饰_保护剂_修补_清水混凝土修复-德州忠岭建筑装饰工程 | 污水处理设备维修_污水处理工程改造_机械格栅_过滤设备_气浮设备_刮吸泥机_污泥浓缩罐_污水处理设备_污水处理工程-北京龙泉新禹科技有限公司 | 飞扬动力官网-广告公司管理软件,广告公司管理系统,喷绘写真条幅制作管理软件,广告公司ERP系统 | LCD3D打印机|教育|桌面|光固化|FDM3D打印机|3D打印设备-广州造维科技有限公司 | 广州活动策划公司-15+年专业大型公关活动策划执行管理经验-睿阳广告 | 胶辊硫化罐_胶鞋硫化罐_硫化罐厂家-山东鑫泰鑫智能装备有限公司 意大利Frascold/富士豪压缩机_富士豪半封闭压缩机_富士豪活塞压缩机_富士豪螺杆压缩机 | 二维运动混料机,加热型混料机,干粉混料机-南京腾阳干燥设备厂 | 舞台木地板厂家_体育运动木地板_室内篮球馆木地板_实木运动地板厂家_欧氏篮球地板推荐 | 单级/双级旋片式真空泵厂家,2xz旋片真空泵-浙江台州求精真空泵有限公司 | 不锈钢搅拌罐_高速搅拌罐厂家-无锡市凡格德化工装备科技有限公司 | 通风天窗,通风气楼,屋顶通风天窗,屋顶通风天窗公司 | 硬度计,金相磨抛机_厂家-莱州华煜众信试验仪器有限公司 | ALC墙板_ALC轻质隔墙板_隔音防火墙板_轻质隔墙材料-湖北博悦佳 | 高温链条油|高温润滑脂|轴承润滑脂|机器人保养用油|干膜润滑剂-东莞卓越化学 | 网站优化公司_北京网站优化_抖音短视频代运营_抖音关键词seo优化排名-通则达网络 | 博医通医疗器械互联网供应链服务平台_博医通 | 传递窗_超净|洁净工作台_高效过滤器-传递窗厂家广州梓净公司 | 立式硫化罐-劳保用品硫化罐-厂家直销-山东鑫泰鑫硫化罐厂家 | 称重传感器,测力传感器,拉压力传感器,压力变送器,扭矩传感器,南京凯基特电气有限公司 | 北京森语科技有限公司-模型制作专家-展览展示-沙盘模型设计制作-多媒体模型软硬件开发-三维地理信息交互沙盘 | 灌装封尾机_胶水灌装机_软管灌装封尾机_无锡和博自动化机械制造有限公司 | 岩棉板|岩棉复合板|聚氨酯夹芯板|岩棉夹芯板|彩钢夹芯板-江苏恒海钢结构 |