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>
                          • 主站蜘蛛池模板: 风化石头制砂机_方解石制砂机_瓷砖石子制砂机_华盛铭厂家 | 喷涂流水线,涂装流水线,喷漆流水线-山东天意设备科技有限公司 | 昆明网络公司|云南网络公司|昆明网站建设公司|昆明网页设计|云南网站制作|新媒体运营公司|APP开发|小程序研发|尽在昆明奥远科技有限公司 | 棉柔巾代加工_洗脸巾oem_一次性毛巾_浴巾生产厂家-杭州禾壹卫品科技有限公司 | 行星搅拌机,双行星搅拌机,动力混合机,无锡米克斯行星搅拌机生产厂家 | 数字展示在线_数字展示行业门户网站 | 金属抛光机-磁悬浮抛光机-磁力研磨机-磁力清洗机 - 苏州冠古科技 | 压缩空气检测_气体_水质找上海京工-服务专业、价格合理 | 闸阀_截止阀_止回阀「生产厂家」-上海卡比阀门有限公司 | 杜甫仪器官网|实验室平行反应器|升降水浴锅|台式低温循环泵 | 标准件-非标紧固件-不锈钢螺栓-非标不锈钢螺丝-非标螺母厂家-三角牙锁紧自攻-南京宝宇标准件有限公司 | 日本细胞免疫疗法_肿瘤免疫治疗_NK细胞疗法 - 免疫密码 | 并网柜,汇流箱,电控设备,中高低压开关柜,电气电力成套设备,PLC控制设备订制厂家,江苏昌伟业新能源科技有限公司 | 帽子厂家_帽子工厂_帽子定做_义乌帽厂_帽厂_制帽厂_帽子厂_浙江高普制帽厂 | 健康管理师报名入口,2025年健康管理师考试时间信息网-网站首页 塑料造粒机「厂家直销」-莱州鑫瑞迪机械有限公司 | pbt头梳丝_牙刷丝_尼龙毛刷丝_PP塑料纤维合成毛丝定制厂_广州明旺 | 滚筒烘干机_转筒烘干机_滚筒干燥机_转筒干燥机_回转烘干机_回转干燥机-设备生产厂家 | 范秘书_懂你的范文小秘书 | 无尘烘箱_洁净烤箱_真空无氧烤箱_半导体烤箱_电子防潮柜-深圳市怡和兴机电 | 高楼航空障碍灯厂家哪家好_航空障碍灯厂家_广州北斗星障碍灯有限公司 | 搅拌磨|搅拌球磨机|循环磨|循环球磨机-无锡市少宏粉体科技有限公司 | 抖音短视频运营_企业网站建设_网络推广_全网自媒体营销-东莞市凌天信息科技有限公司 | 智慧钢琴-电钢琴-便携钢琴-数码钢琴-深圳市特伦斯乐器有限公司 | 宁夏档案密集柜,智能密集柜,电动手摇密集柜-盛隆柜业宁夏档案密集柜厂家 | 硬质合金模具_硬质合金非标定制_硬面加工「生产厂家」-西迪技术股份有限公司 | 123悬赏网_发布悬赏任务_广告任务平台| 电动高尔夫球车|电动观光车|电动巡逻车|电动越野车厂家-绿友机械集团股份有限公司 | 浙江宝泉阀门有限公司| 深圳市宏康仪器科技有限公司-模拟高空低压试验箱-高温防爆试验箱-温控短路试验箱【官网】 | 密集架-密集柜厂家-智能档案密集架-自动选层柜订做-河北风顺金属制品有限公司 | 浙江华锤电器有限公司_地磅称重设备_防作弊地磅_浙江地磅售后维修_无人值守扫码过磅系统_浙江源头地磅厂家_浙江工厂直营地磅 | 不锈钢散热器,冷却翅片管散热器厂家-无锡市烨晟化工装备科技有限公司 | 膜结构_ETFE膜结构_膜结构厂家_膜结构设计-深圳市烨兴智能空间技术有限公司 | 智能汉显全自动量热仪_微机全自动胶质层指数测定仪-鹤壁市科达仪器仪表有限公司 | 无尘烘箱_洁净烤箱_真空无氧烤箱_半导体烤箱_电子防潮柜-深圳市怡和兴机电 | 新型锤式破碎机_新型圆锥式_新型颚式破碎机_反击式打沙机_锤式制砂机_青州建源机械 | 电加热导热油炉-空气加热器-导热油加热器-翅片电加热管-科安达机械 | 石家庄网站建设|石家庄网站制作|石家庄小程序开发|石家庄微信开发|网站建设公司|网站制作公司|微信小程序开发|手机APP开发|软件开发 | 化妆品加工厂-化妆品加工-化妆品代加工-面膜加工-广东欧泉生化科技有限公司 | 北钻固控设备|石油钻采设备-石油固控设备厂家 | 英国公司注册-新加坡公司注册-香港公司开户-离岸公司账户-杭州商标注册-杭州优创企业 |