Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / June 2006

Tip: Looking for answers? Try searching our database.

VARCHAR vs. LONG VARCHAR

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Smith - 28 Jun 2006 06:44 GMT
What is the difference? Is LONG VARCHAR only 28 bytes longer then VARCHAR?
Is this the only difference?
Mark A - 28 Jun 2006 06:58 GMT
> What is the difference? Is LONG VARCHAR only 28 bytes longer then VARCHAR?
> Is this the only difference?

Originally VARCHAR was limited to a length of 255, so LONG VARCHAR was
needed, but obviously they both support about 32K now (VARCHAR supports 28
bytes less as you mentioned).

One big difference between VARCHAR and LONG VARCHAR is that LONG VARCHAR is
stored in a separate area like a LOB (CLOB, BLOB, etc) and also like a LOB,
does not use bufferpools, so every select, insert, update, or delete of a
LONG VARCHAR  requires direct disk I/O, just like LOBs.

In order to use the 32K bufferpool for VARCHAR, they had to make the maximum
size 28 bytes shy of 32K (although you may have to make it even smaller to
ensure your entire row fits in a 32K page, accounting for page and row
overhead)..

For this reason (and because IBM will be phasing out LONG VARCHAR in a
future release), you should not use LONG VARCHAR on any new development.
John Smith - 28 Jun 2006 07:24 GMT
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.