有没有人有相当多的证据,CHAR比VARCHAR快? [英] Does anyone have considerable proof that CHAR is faster than VARCHAR?

查看:234
本文介绍了有没有人有相当多的证据,CHAR比VARCHAR快?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何基准,图形任何东西?它的所有学术和理论在网络。

Any benchmark, graph anything at all ? Its all academic and theoretical across the web.

确定它不是第一次提出这个问题,他们都说使用CHAR结果更快的选择?我甚至读过MySQL的书,它的一切都一样,但我没有遇到任何基准证明这一点。

Ok its not the first time that this question has been asked, they all say that using CHAR results in faster selects? I even read in MySQL books, its all the same but I have not come across any benchmark that proves this.

任何人都可以忽略这一点吗?

Can any one shed some light over this?

推荐答案

这是一个简单的逻辑,为了简化我将以CSV文件为例...

This is simple logic, to simplify I'll take the example of a CSV file...

在此行中搜索更快

1231; 231; 32345; 21312; 23435552; 1231; 1; 243; 211; 3525321 ; 44343112;

1231;231;32345;21312;23435552;1231;1;243;211;3525321;44343112;

或这一个

12; 23; 43; 54; 56; 76; 54; 83; 45; 91; 28; 92

12;23;43;54;56;76;54;83;45;91;28;92

只要您正确定义长度,CHAR应该会更快,因为预定义的格式有助于处理时间。

as long as you define your length correctly CHAR should be faster as the predefined format help the processing time.

这篇关于有没有人有相当多的证据,CHAR比VARCHAR快?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆