Since MySQL doesn't support TEXT/BLOB columns for in-memory temporary tables, it could have a potential gain to convert some TEXT fields to VARCHAR. Additionally, MySQL 5.0.3+ also allows varchar columns up to 65,535 characters, depending on character set and subject to the total row size limit, which removes the major disadvantage of VARCHAR fields being limited to 255 characters.

I think a good recommendation is to place maximum size limits on CCK fields if possible, ideally less than 255 characters so that it will utilize a VARCHAR column by default. If the limit is greater it may be possible to modify the column type, subject to the row size limitations.

Some core tables also use TEXT columns for values that may reasonably fit within a large VARCHAR field (e.g. vocabulary.description, term_data.description), and conversion may allow the database to make better use of memory-based temporary tables.

Comments

mikeytown2’s picture

Status: Active » Closed (duplicate)

Mark this as a duplicate of this issue
#973380: Optimize usage of TEXT columns
I already issue a warning for this; but it's not as smart as it needs to be.