基于字符数据的数据库列大小 [英] Database column sizes for character based data

查看:90
本文介绍了基于字符数据的数据库列大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚遇到一个数据库,其中所有基于字符的列的大小以8的倍数指定(例如Username = varchar(32),Forename = nvarchar(128)等)。这是否与数据库的性能还是完全没有意义?



谢谢。



NB这是在SQL 2000数据库中。

解决方案

由于它们是VARchars,所使用的实际空间是基于内容。如果他们是CHAR,我会开始担心。



-Edoode


I've just come across a database where all the character based columns have their size specified in multiples of 8 (e.g. Username = varchar(32), Forename = nvarchar(128) etc.) Would this have any bearing on the performance of the database or is it completely pointless?

Thanks.

N.B. This is in a SQL 2000 database.

解决方案

Since they are VARchars the actual space used is based on the content. I would start to worry if they were CHARs.

-Edoode

这篇关于基于字符数据的数据库列大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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