How to design or consider that when storing character strings?

How to design or consider that when storing character strings?

Answer: 1. If the stored strings are almost equal in length, you can choose the char fixed-length string type.

2. When the length of the string cannot be determined, the variable string type of varchar should be considered first. It does not allocate storage space in advance and the length should not exceed 5000. If the length exceeds 5000,

You should consider using the text type and creating a separate table with a primary key to avoid affecting the indexing efficiency of other fields.

 

 

 

 

 

Learning Ali Java Specification

Guess you like

Origin www.cnblogs.com/XiDaPuBen/p/12719168.html