L
L
Leopandro2016-02-18 11:52:37
MySQL
Leopandro, 2016-02-18 11:52:37

What will work faster (data types in mysql)?

Hello, I have a question for you about the types of values ​​in columns, what will work faster:
1) INT or INT (11) ( this is pk)
2) INT or INT (11) (some number like 88005553535)
3 )VARCHAR(400) or TEXT(If the field contains a value similar to "Ivanov Ivan Ivanovich" or "Ivanovo, Pushkin street 23, apartment 10".

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander N++, 2016-02-18
@sanchezzzhak

mysql5,6 or 5.7 can use full text index on TEXT fields
TEXT without full text index is stored in the database as BLOB data and does not affect table size limits. (indexes for such data types are stored separately)
varchar and similar are stored fixed in the database
TEXT can only be a full-text index
varchar can be just an index and a full-text
index is an exact match 'Pushkin's house 23'
full-text index is a partial match 'Pushkin * 23' ala LIKE only uses indexes
Finishing:
The table limit per row should not exceed 65,535 bytes for the entire table.
If we create, say, a table
id | varchar(65535) then no more columns can be created in the database
id | varchar(65530) blob| text | text but with this option you can.
Maximum table size 65TB
Why am I? use resources properly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question