Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memo vs Text Record Record Length

Status
Not open for further replies.

bradmaunsell

Programmer
May 8, 2001
156
US
Can anyone tell me the pros and con of using a text field vs a memo field regarding to record length and performance?

I am writing a general ledger system and createing a transaction table that includes:

TrxDate
GL_Account
TrxNote (Text vs Memo)
DR
CR
etc.

Will the system have a shorter record length and better performance if I use a text field vs. a memo field for "TrxNote"?

Any suggestions welcome.

Thanks,
Brad
 
The answer is - it all depends.. ..

Text field is a predefined limit ( good because it stops the user waffling on and on and on etc.. )
Memo fields are ( in effect ) unlimited in lenght. Memory usage is 2 bytes per character stored.

Time was when a 150 character text field ALWAYS took up 150 bytes in memory regardless of the number of characters actually stored in the field. However this doesn't happen now. It is 2 bytes per character stored.

The real issue is if your users will want to search the field for a character string, or if you'll ever use the field in a Distinct query, or you want to sort by the data in that field then TEXT is the only way to go.




G LS
 
I knew the limited/unlimited issue but not the 2 byte text storage.

Sounds like TEXT is clearly the best choice for this app.

Thanks,
Brad
South Burlington, VT
 
2 bytes bacause they are now stored as unicode two byte pairs - This is so that Billy boy can sell is products in ever more obscure parts of the world that don't just use the 26 English language character set !

There is in effect no difference in memory usage between the two now ( for char lengths < 256 )
The real issue is Grouping, Sorting, Indexing, Searching, Filtering - All impossible with MEMO


G LS
 
Yes, I understand. In this case, there may be an occatrional need to search the text for &quot;something&quot;.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top