Database strings.
- From: TonyG <TonyG@xxxxxxxx>
- Date: Tue, 17 Jun 2008 08:51:26 -0500
I use the MySql database. My question concerns the storage of character strings. I always use varchar for character strings and in my current program I specify 250 as the maximum length for all of my strings.
For some strings that large of a number is ridiculously long. Is there any disadvantage to using such a large number? Is my database wasting space somehow?
My book on MySql says that varchar uses one byte to store the length of the string. Does that mean that varchars are limited to 256 (or 255) characters? My book doesn't say. Perhaps does varchar allow longer strings using a different scheme.
.
- Follow-Ups:
- Re: Database strings.
- From: Ashutosh Bhawasinka
- Re: Database strings.
- Prev by Date: Re: AfxCallWndProc and Custom Control Development
- Next by Date: Re: Need to save a bitmap in some standard graphics file format
- Previous by thread: loosing messages leakes my app...
- Next by thread: Re: Database strings.
- Index(es):
Relevant Pages
|
Loading