Should I use "Text field" or "Text field (long)" when creating a new text attribute?

Introduction

Recent versions of Asset Bank (3.533+) support four types of text attribute: "Text field", "Text field (long)", "Text area" and "Text area (long)". These 4 attributes allow two different database storage methods and two different styles:

Storage
VARCHARCLOB
StyleSingle lineText fieldText field (long)
Multi lineText areaText area (long)

This article talks about the advantages and disadvantages of the different storage methods.

How to Choose a Storage Method

Simply put, the advantage of the "long" text attribute types is that they allow you to store thousands of characters of text in an attribute whereas the "short" text attribute types only allow a maximum of 255 characters. The advantage of the "short" attribute types is that they are quicker to load and save from the database, so if you use the "short" attribute types your assets will load and save more quickly.

The difference in performance is likely to be less noticeable if you have a small number of assets and a small number of attributes, so unless you are storing a large amount of data (say tens of thousands of assets or tens of attributes per asset) then you should probably just use the "long" attribute types so that you have more flexibility in the amount of text that you can store per asset attribute.

Note that Asset Bank uses a search index that is separate from the database, so the attribute type that you choose will not affect the speed of searches, only the speed of loading and saving assets.


Was this article helpful?

Yes No

Thanks for your feedback!