It makes a difference to use LONGTEXT instead of VARCHAR (255)

2

I would like to know if I use LONGTEXT instead of VARCHAR (255) would cause more lag, which would have a greater advantage ??

    
asked by anonymous 28.05.2015 / 17:08

1 answer

5

Yes, it makes a difference.

These two types of data are stored differently in the database and have different functions. For example, you can index a column of type VARCHAR , but you can not index a column of type TEXT or LONGTEXT

Only use LONGTEXT if it is to store a large amount of text in this column (it can store up to 4GB). Otherwise, for simpler textual information, prefer VARCHAR .

    
28.05.2015 / 17:23