Does it make sense to use byte-sized column lengths?

MS SQL Server 2000

I realized that in the last two tables I created, I determined the length of the varchar column by force 2. Thus, I have one column with a length of 1024 or 512 or 256. I realized that depending on the length of the other columns in the table, probably doesn't matter at all. Does it make sense to implement such a design? I think No, but I would like to get your opinion.

+3
source share
2 answers

I would say that the size of the column should represent the type of data you are storing. If he has any use for speed, it will be insignificant, and the headaches that you have with the wrong column length will far outweigh any thing received.

, , , Sql 2000. , 8192 . 2, , . , , varchar (, 5000, , 8192, 2- ) , , , .

, , . , , - , , , .

+3

, . , , , .

+1

Source: https://habr.com/ru/post/1708346/


All Articles