[Openstack] TEXT vs VARCHAR column type

Thuy Christenson thuy at us.ibm.com
Sun Jul 28 00:32:42 UTC 2013


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):
instances.launched_on
compute_nodes.hypervisor_type
compute_nodes.cpu_info

Thanks..
Thuy Christenson





More information about the Openstack mailing list