PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Mick Ghazey <mghazey at yahoo dot com>
Subject: Re: Size of null char field
Date: Apr 28 1998 8:53PM

--Michael Peppler  wrote:
>
> Mick Ghazey writes:
>  > How big is a char field that allows nulls? The reason I ask is
because
>  > sybperl returns trailing spaces to fill out the column to the
declared
>  > width for not null fields. Yet it returns only the actual string
for
>  > null fields. Does that imply that sybase uses less disk space for
null
>  > fields?
> 
> As I believe others have reported, Sybase stores nullable char fields
> as varchars, which is the reason why they don't get padded with ' '
to 
> the actual maximum width. I'm not 100% sure if varchar fields use
less 
> space than char fields, but I think so (at least if they are not
> completely filled...)
> 
> Michael
> -- 
> Michael Peppler         -||-  Data Migrations Inc.
> mpeppler@datamig.com    -||-  http://www.mbay.net/~mpeppler
> Int. Sybase User Group  -||-  http://www.isug.com

I've visited Deja News. The upshot is pretty much what you've said. In
particular, nullable fields should be used to save disk space but
there is a performance hit, expecially when doing updates or inserts.

Thanks,
Mick
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com