Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Varchar takes more diskspace than Character Type ?
Message
From
10/09/2008 17:59:14
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01346349
Message ID:
01346483
Views:
8
>Hi Sergio,
>
>>Changed one large column (240 chars) from Character to Varchar and size on disc actually increased ???
>
>Yes. Varchars work similar to fields that support NULL values. There's an invisible field in the table call _NullFlags. Varchar fields need one bit in this field. The bit indicates if the value has the maximum size or not. When the bit is set, the first byte in the varchar field on disk indicates the length. Hence the table grows if you haven't had a nullable or varchar field, or remains the same if there's a free bit in the field.

Hi Christof :)

Thks for resourcefull answer.

Rgds+++
Sergio
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Reply
Map
View

Click here to load this message in the networking platform