Re: Regarding varchar
- From: "Art S. Kagel" <kagel@xxxxxxxxxxxxx>
- Date: Tue, 22 Aug 2006 09:55:14 -0400
Prateek Jain wrote:
Hello everybody,
I have one table in which varchar is declared as
varchar(100,1)
whats the significance of 1 in the above varchar().
any idea.
This is explained in the Guide to SQL Reference and the Guide to SQL Syntax even. Q&D you declare a VARCHAR (variable length character) column as (max, reserved) - the engine allocates each new row with at least 'reserved' + 1 bytes (to record the column's actual length) on the row's data page(s) or the actual number of bytes in the column's data + 1 byte (if the data is longer than 'reserved') up to 'max' bytes + 1. Older OnLine documentation seemed to indicate that when a VARCHAR column was expanded to accomodate a longer value it was expanded by at least 'reserved' bytes perhaps to minimize row relocations for variable length rows that grow over time. It's not clear in the docs if this was true then or if it was that it's still true in IDS.
Art S. Kagel
.
- Follow-Ups:
- Re: Regarding varchar
- From: mark.scranton@xxxxxxxxx
- Re: Regarding varchar
- References:
- Regarding varchar
- From: Prateek Jain
- Regarding varchar
- Prev by Date: Re: Regarding varchar
- Next by Date: Re: Deleted rows
- Previous by thread: Re: Regarding varchar
- Next by thread: Re: Regarding varchar
- Index(es):
Relevant Pages
|
|