← Back to team overview

openstack team mailing list archive

TEXT vs VARCHAR column type


Does anyone know the history of why some of the columns in the nova tables
are defined as Text (sql TEXT or CLOB) instead of String (sql VARCHAR) when
the lengths of their values are normally small? For mysql and other
databases, the performance of accessing VARCHAR is much faster than TEXT or
CLOB because VARCHAR data is stored inline with the table. If these TEXT
columns are fetched frequently and their lengths are small, can they be
defined as VARCHAR?? Any thoughts/suggestions?

For example (table.column):

Thuy Christenson