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

    • <bdo id='fpBZB'></bdo><ul id='fpBZB'></ul>

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

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

      1. <tfoot id='fpBZB'></tfoot>
      2. <legend id='fpBZB'><style id='fpBZB'><dir id='fpBZB'><q id='fpBZB'></q></dir></style></legend>
      3. utf8_general_ci 和 utf8_unicode_ci 有什么區別?

        What#39;s the difference between utf8_general_ci and utf8_unicode_ci?(utf8_general_ci 和 utf8_unicode_ci 有什么區別?)

            <tbody id='F3dp8'></tbody>
            • <bdo id='F3dp8'></bdo><ul id='F3dp8'></ul>

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

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

                  本文介紹了utf8_general_ci 和 utf8_unicode_ci 有什么區別?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  utf8_general_ciutf8_unicode_ci 在性能上有區別嗎?

                  Between utf8_general_ci and utf8_unicode_ci, are there any differences in terms of performance?

                  推薦答案

                  對于那些在 2020 年或之后仍然遇到這個問題的人,有更新的選項可能比兩者都更好這些.例如,utf8mb4_0900_ai_ci.

                  For those people still arriving at this question in 2020 or later, there are newer options that may be better than both of these. For example, utf8mb4_0900_ai_ci.

                  所有這些排序規則都是針對 UTF-8 字符編碼的.不同之處在于文本的排序和比較方式.

                  All these collations are for the UTF-8 character encoding. The differences are in how text is sorted and compared.

                  _unicode_ci_general_ci 是兩組不同的規則,用于按照我們期望的方式對文本進行排序和比較.較新版本的 MySQL 也引入了新的規則集,例如 _0900_ai_ci 用于基于 Unicode 9.0 的等效規則 - 并且沒有等效的 _general_ci 變體.現在閱讀本文的人可能應該使用這些較新的排序規則之一,而不是 _unicode_ci_general_ci.以下對這些舊排序規則的描述僅供參考.

                  _unicode_ci and _general_ci are two different sets of rules for sorting and comparing text according to the way we expect. Newer versions of MySQL introduce new sets of rules, too, such as _0900_ai_ci for equivalent rules based on Unicode 9.0 - and with no equivalent _general_ci variant. People reading this now should probably use one of these newer collations instead of either _unicode_ci or _general_ci. The description of those older collations below is provided for interest only.

                  MySQL 目前正在擺脫舊的、有缺陷的 UTF-8 實現.目前,您需要使用 utf8mb4 而不是 utf8 作為字符編碼部分,以確保您獲得固定版本.有缺陷的版本仍然是為了向后兼容,盡管它已被棄用.

                  MySQL is currently transitioning away from an older, flawed UTF-8 implementation. For now, you need to use utf8mb4 instead of utf8 for the character encoding part, to ensure you are getting the fixed version. The flawed version remains for backward compatibility, though it is being deprecated.

                  主要區別

                  • utf8mb4_unicode_ci 基于官方的 Unicode 規則進行通用排序和比較,可在多種語言中準確排序.

                  • utf8mb4_unicode_ci is based on the official Unicode rules for universal sorting and comparison, which sorts accurately in a wide range of languages.

                  utf8mb4_general_ci 是一組簡化的排序規則,旨在盡其所能,同時采取許多旨在提高速度的捷徑.它不遵循 Unicode 規則,在某些情況下會導致不受歡迎的排序或比較,例如在使用特定語言或字符時.

                  utf8mb4_general_ci is a simplified set of sorting rules which aims to do as well as it can while taking many short-cuts designed to improve speed. It does not follow the Unicode rules and will result in undesirable sorting or comparison in some situations, such as when using particular languages or characters.

                  在現代服務器上,這種性能提升幾乎可以忽略不計.它是在服務器的 CPU 性能僅達到當今計算機的一小部分時設計的.

                  On modern servers, this performance boost will be all but negligible. It was devised in a time when servers had a tiny fraction of the CPU performance of today's computers.

                  utf8mb4_unicode_ci 優于 utf8mb4_general_ci

                  Benefits of utf8mb4_unicode_ci over utf8mb4_general_ci

                  utf8mb4_unicode_ci 使用 Unicode 規則進行排序和比較,它采用相當復雜的算法來在多種語言和使用多種特殊字符時進行正確排序.這些規則需要考慮特定語言的約定;不是每個人都按照我們所說的字母順序"對他們的字符進行排序.

                  utf8mb4_unicode_ci, which uses the Unicode rules for sorting and comparison, employs a fairly complex algorithm for correct sorting in a wide range of languages and when using a wide range of special characters. These rules need to take into account language-specific conventions; not everybody sorts their characters in what we would call 'alphabetical order'.

                  就拉丁語(即歐洲")語言而言,Unicode 排序與 MySQL 中簡化的 utf8mb4_general_ci 排序沒有太大區別,但仍有一些區別:

                  As far as Latin (ie "European") languages go, there is not much difference between the Unicode sorting and the simplified utf8mb4_general_ci sorting in MySQL, but there are still a few differences:

                  • 例如,Unicode 排序規則對?"進行排序;像ss"和?"像OE"正如人們通常想要的那樣,而 utf8mb4_general_ci 將它們作為單個字符進行排序(大概分別像s"和e").

                  • For examples, the Unicode collation sorts "?" like "ss", and "?" like "OE" as people using those characters would normally want, whereas utf8mb4_general_ci sorts them as single characters (presumably like "s" and "e" respectively).

                  某些 Unicode 字符被定義為可忽略的,這意味著它們不應計入排序順序,而應將比較轉移到下一個字符.utf8mb4_unicode_ci 正確處理這些.

                  Some Unicode characters are defined as ignorable, which means they shouldn't count toward the sort order and the comparison should move on to the next character instead. utf8mb4_unicode_ci handles these properly.

                  在非拉丁語言中,例如亞洲語言或具有不同字母表的語言,Unicode 排序和簡化的utf8mb4_general_ci 排序之間可能存在很多更多差異.utf8mb4_general_ci 的適用性在很大程度上取決于所使用的語言.對于某些語言,這將是相當不夠的.

                  In non-latin languages, such as Asian languages or languages with different alphabets, there may be a lot more differences between Unicode sorting and the simplified utf8mb4_general_ci sorting. The suitability of utf8mb4_general_ci will depend heavily on the language used. For some languages, it'll be quite inadequate.

                  你應該使用什么?

                  幾乎可以肯定沒有理由再使用 utf8mb4_general_ci,因為我們已經忘記了 CPU 速度足夠低以至于性能差異很重要的點.您的數據庫幾乎肯定會受到除此之外的其他瓶頸的限制.

                  There is almost certainly no reason to use utf8mb4_general_ci anymore, as we have left behind the point where CPU speed is low enough that the performance difference would be important. Your database will almost certainly be limited by other bottlenecks than this.

                  過去,有些人建議使用 utf8mb4_general_ci,除非準確排序非常重要以證明性能成本是合理的.如今,這種性能成本幾乎消失了,開發人員更加重視國際化.

                  In the past, some people recommended to use utf8mb4_general_ci except when accurate sorting was going to be important enough to justify the performance cost. Today, that performance cost has all but disappeared, and developers are treating internationalization more seriously.

                  有一種觀點認為,如果速度對您來說比準確性更重要,那么您最好根本不進行任何排序.如果您不需要算法準確,那么使算法更快是微不足道的.因此,utf8mb4_general_ci 是一種折衷方案,出于速度原因可能不需要,也可能出于準確性原因也不適合.

                  There's an argument to be made that if speed is more important to you than accuracy, you may as well not do any sorting at all. It's trivial to make an algorithm faster if you do not need it to be accurate. So, utf8mb4_general_ci is a compromise that's probably not needed for speed reasons and probably also not suitable for accuracy reasons.

                  我要補充的另一件事是,即使您知道您的應用程序僅支持英語,它可能仍需要處理人名,其中通常可能包含其他語言中使用的字符,在這些語言中它也同樣重要正確排序.對所有內容使用 Unicode 規則有助于讓您高枕無憂,因為非常聰明的 Unicode 人員已經非常努力地使排序正常工作.

                  One other thing I'll add is that even if you know your application only supports the English language, it may still need to deal with people's names, which can often contain characters used in other languages in which it is just as important to sort correctly. Using the Unicode rules for everything helps add peace of mind that the very smart Unicode people have worked very hard to make sorting work properly.

                  各部分的含義

                  首先,ci 用于不區分大小寫的排序和比較.這意味著它適用于文本數據,大小寫并不重要.其他類型的排序規則是 cs(區分大小寫),用于區分大小寫的文本數據,以及 bin,用于編碼需要匹配的地方,逐位,這適用于真正編碼的二進制數據的字段(包括,例如,Base64).區分大小寫的排序會導致一些奇怪的結果,區分大小寫的比較可能會導致重復值僅在字母大小寫中不同,因此區分大小寫的排序規則對文本數據不再受歡迎——如果大小寫對您很重要,那么其他情況下的標點符號可以忽略等等可能也很重要,二進制排序可能更合適.

                  Firstly, ci is for case-insensitive sorting and comparison. This means it's suitable for textual data, and case is not important. The other types of collation are cs (case-sensitive) for textual data where case is important, and bin, for where the encoding needs to match, bit for bit, which is suitable for fields which are really encoded binary data (including, for example, Base64). Case-sensitive sorting leads to some weird results and case-sensitive comparison can result in duplicate values differing only in letter case, so case-sensitive collations are falling out of favor for textual data - if case is significant to you, then otherwise ignorable punctuation and so on is probably also significant, and a binary collation might be more appropriate.

                  接下來,unicodegeneral 指的是特定的排序和比較規則——特別是文本被規范化或比較的方式.utf8mb4 字符編碼有許多不同的規則集,unicodegeneral 是兩種試圖在所有可能的語言而不是一種特定語言中都能很好地工作的規則.這兩組規則之間的差異是本答案的主題.請注意,unicode 使用來自 Unicode 4.0 的規則.MySQL 的最新版本使用來自 Unicode 5.2 的規則添加了規則集 unicode_520,并使用來自 Unicode 9.0 的規則添加了 0900(刪除了unicode_"部分).

                  Next, unicode or general refers to the specific sorting and comparison rules - in particular, the way text is normalized or compared. There are many different sets of rules for the utf8mb4 character encoding, with unicode and general being two that attempt to work well in all possible languages rather than one specific one. The differences between these two sets of rules are the subject of this answer. Note that unicode uses rules from Unicode 4.0. Recent versions of MySQL add the rulesets unicode_520 using rules from Unicode 5.2, and 0900 (dropping the "unicode_" part) using rules from Unicode 9.0.

                  最后,utf8mb4當然是內部使用的字符編碼.在這個答案中,我只談論基于 Unicode 的編碼.

                  And lastly, utf8mb4 is of course the character encoding used internally. In this answer I'm talking only about Unicode based encodings.

                  這篇關于utf8_general_ci 和 utf8_unicode_ci 有什么區別?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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='54Lx5'><style id='54Lx5'><dir id='54Lx5'><q id='54Lx5'></q></dir></style></legend>
                      <tbody id='54Lx5'></tbody>

                  1. <small id='54Lx5'></small><noframes id='54Lx5'>

                      <tfoot id='54Lx5'></tfoot>

                      1. <i id='54Lx5'><tr id='54Lx5'><dt id='54Lx5'><q id='54Lx5'><span id='54Lx5'><b id='54Lx5'><form id='54Lx5'><ins id='54Lx5'></ins><ul id='54Lx5'></ul><sub id='54Lx5'></sub></form><legend id='54Lx5'></legend><bdo id='54Lx5'><pre id='54Lx5'><center id='54Lx5'></center></pre></bdo></b><th id='54Lx5'></th></span></q></dt></tr></i><div class="tfrjth5" id='54Lx5'><tfoot id='54Lx5'></tfoot><dl id='54Lx5'><fieldset id='54Lx5'></fieldset></dl></div>

                          <bdo id='54Lx5'></bdo><ul id='54Lx5'></ul>
                          • 主站蜘蛛池模板: 小青瓦丨古建筑瓦丨青瓦厂家-宜兴市徽派古典建筑材料有限公司 | CCC验厂-家用电器|服务器CCC认证咨询-奥测世纪 | 电杆荷载挠度测试仪-电杆荷载位移-管桩测试仪-北京绿野创能机电设备有限公司 | 临海涌泉蜜桔官网|涌泉蜜桔微商批发代理|涌泉蜜桔供应链|涌泉蜜桔一件代发 | 橡胶膜片,夹布膜片,橡胶隔膜密封,泵阀设备密封膜片-衡水汉丰橡塑科技公司网站 | 玻璃钢格栅盖板|玻璃钢盖板|玻璃钢格栅板|树篦子-长沙川皖玻璃钢制品有限公司 | 智能汉显全自动量热仪_微机全自动胶质层指数测定仪-鹤壁市科达仪器仪表有限公司 | 广东泵阀展|阀门展-广东国际泵管阀展览会 | 仪器仪表网 - 永久免费的b2b电子商务平台 | 齿式联轴器-弹性联轴器-联轴器厂家-江苏诺兴传动联轴器制造有限公司 | 河南不锈钢水箱_地埋水箱_镀锌板水箱_消防水箱厂家-河南联固供水设备有限公司 | 蓝鹏测控平台 - 智慧车间系统 - 车间生产数据采集与分析系统 | 步进电机_agv电机_伺服马达-伺服轮毂电机-和利时电机 | 广东成考网-广东成人高考网| 升降机-高空作业车租赁-蜘蛛车-曲臂式伸缩臂剪叉式液压升降平台-脚手架-【普雷斯特公司厂家】 | 威廉希尔WilliamHill·足球(中国)体育官方网站 | 密集柜_档案密集柜_智能密集架_密集柜厂家_密集架价格-智英伟业 密集架-密集柜厂家-智能档案密集架-自动选层柜订做-河北风顺金属制品有限公司 | 塑胶跑道施工-硅pu篮球场施工-塑胶网球场建造-丙烯酸球场材料厂家-奥茵 | 工业铝型材-铝合金电机壳-铝排-气动执行器-山东永恒能源集团有限公司 | 北京律师咨询_知名专业北京律师事务所_免费法律咨询 | 定硫仪,量热仪,工业分析仪,马弗炉,煤炭化验设备厂家,煤质化验仪器,焦炭化验设备鹤壁大德煤质工业分析仪,氟氯测定仪 | 耐高温风管_耐高温软管_食品级软管_吸尘管_钢丝软管_卫生级软管_塑料波纹管-东莞市鑫翔宇软管有限公司 | Dataforth隔离信号调理模块-信号放大模块-加速度振动传感器-北京康泰电子有限公司 | 逗网红-抖音网红-快手网红-各大平台网红物品导航| 隐形纱窗|防护纱窗|金刚网防盗纱窗|韦柏纱窗|上海青木装潢制品有限公司|纱窗国标起草单位 | 游泳池设计|设备|配件|药品|吸污机-东莞市太平洋康体设施有限公司 | 消电检公司,消电检价格,北京消电检报告-北京设施检测公司-亿杰(北京)消防工程有限公司 | SMC-SMC电磁阀-日本SMC气缸-SMC气动元件展示网 | 杭州月嫂技术培训服务公司-催乳师培训中心报名费用-产后康复师培训机构-杭州优贝姆健康管理有限公司 | 书法培训-高考书法艺考培训班-山东艺霖书法培训凭实力挺进央美 | 济南货架定做_仓储货架生产厂_重型货架厂_仓库货架批发_济南启力仓储设备有限公司 | 铣刨料沥青破碎机-沥青再生料设备-RAP热再生混合料破碎筛分设备 -江苏锡宝重工 | 礼至家居-全屋定制家具_一站式全屋整装_免费量房设计报价 | 紫外可见光分光度计-紫外分光度计-分光光度仪-屹谱仪器制造(上海)有限公司 | 天空彩票天下彩,天空彩天空彩票免费资料,天空彩票与你同行开奖,天下彩正版资料大全 | 滚筒烘干机_转筒烘干机_滚筒干燥机_转筒干燥机_回转烘干机_回转干燥机-设备生产厂家 | 无尘烘箱_洁净烤箱_真空无氧烤箱_半导体烤箱_电子防潮柜-深圳市怡和兴机电 | Akribis直线电机_直线模组_力矩电机_直线电机平台|雅科贝思Akribis-杭州摩森机电科技有限公司 | 能耗监测系统-节能监测系统-能源管理系统-三水智能化 | 药品冷藏箱厂家_低温冰箱_洁净工作台-济南欧莱博电子商务有限公司官网 | 智能交通网_智能交通系统_ITS_交通监控_卫星导航_智能交通行业 |