MySQL Forums :: Performance :: text vs varchar

Advanced Search

text vs varchar
Posted by: hua kai ()
Date: April 28, 2016 08:36AM


I use innodb storage engine.

As I know, if data lenght is not more than 255, it's better to use varchar(255) than text. But if the lenght is more than 255, like 4000, is that same to use varchar(4000) as text? which is better for performance?

And for these big data type columns (this column will not be used in select/query list in main table, just used in get one specific item with primary key query), which is better:
1. stored with other column in the same table
2. stored in another seperated table.

or both are ok, for the column will not be used in select for list

Options: ReplyQuote

Subject Views Written By Posted
text vs varchar 751 hua kai 04/28/2016 08:36AM
Re: text vs varchar 377 Øystein Grøvlen 04/29/2016 12:41AM
Re: text vs varchar 390 Rick James 04/30/2016 11:51PM
Re: text vs varchar 419 Øystein Grøvlen 05/02/2016 04:37AM
Re: text vs varchar 358 hua kai 05/02/2016 09:14PM
Re: text vs varchar 366 Øystein Grøvlen 05/03/2016 02:19AM
Re: text vs varchar 557 hua kai 05/03/2016 04:12AM
Re: text vs varchar 340 hua kai 05/02/2016 08:02PM
Re: text vs varchar 461 Øystein Grøvlen 05/03/2016 02:25AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.