S
S
Sergey Pugovkin2018-12-26 01:50:33
MySQL
Sergey Pugovkin, 2018-12-26 01:50:33

Varchar(5000) or text?

Mariadb
innodb
field will be selected both when getting a specific record (for example, where id = ...)
and when getting multiple records (for example, where created_at > ...)
indexes are not needed for this field.
The most common operations are select.
What to choose?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WebDev, 2018-12-26
@kirill-93

The text type is designed for large amounts of data, varchar for small ones. It would be logical to assume that the choice of text would be more correct.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question