Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: White space compression in Oracle

Re: White space compression in Oracle

From: Marc Perkowitz <mperkowitz_at_twjconsulting.com>
Date: Tue, 12 Feb 2002 08:48:46 -0800
Message-ID: <F001.0040CCCF.20020212080323@fatcity.com>

Bjørn,
Aren't those semantics all host language based?  I haven't been working on Pro-X languages for a while, but I seem to recall that there were language options (switches, directives) on how the comparisons were done.  Also, you could easily move the data from one data type to another if needed.  In fact, in the early days, I remember VARCHAR2 was also blank-padded on output by default and trimmed when storing into the database.  Are you referring to more recent ANSI standards?  I believe you can still turn off the ANSI semantics if you want.  
Marc.
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

  To: <A title=ORACLE-L_at_fatcity.com
  href="mailto:ORACLE-L_at_fatcity.com">Multiple recipients of list ORACLE-L   

  Sent: Tuesday, February 12, 2002 3:18   AM
  Subject: Re: White space compression in   Oracle
  Marc,There are subtle differences between CHAR and   VARCHAR2 when it comes to comparison semantics as CHAR comparisons are blank   padded, which VARCHAR2 are not.  Thanks, Bjørn.Marc   Perkowitz wrote:             

    Beth,
    Actually, varchar2 is char with the trailing     spaces removed.  What's the difficulty with switching to     varchar2?  Does RDB regenerate the white spaces when retrieving the     data or something?   Generally, everyone uses varchar2 in     Oracle.
     
    Marc PerkowitzSenior ConsultantTWJ
    Consulting, LLC
     
    847-256-8866 x15<A
    href="http://www.twjconsulting.com">www.twjconsulting.com     <BLOCKQUOTE dir=ltr
    style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,0) 2px solid; MARGIN-RIGHT: 0px">

      <BLOCKQUOTE dir=ltr 
      style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,0) 2px solid; MARGIN-RIGHT: 0px">

<DIV
style="FONT: 10pt arial; font-stretch: normal; font-size-adjust: none">----- Original Message -----
<DIV
style="BACKGROUND-ATTACHMENT: scroll; BACKGROUND-IMAGE: none; FONT: 10pt arial; BACKGROUND-REPEAT: repeat; BACKGROUND-COLOR: rgb(228,228,228); font-stretch: normal; font-size-adjust: none; x-background-x-position: 0%; x-background-y-position: 0%">From:<A title=Beth.Seefelt_at_TetleyUSA.com href="mailto:Beth.Seefelt_at_TetleyUSA.com"> Seefelt, Beth
<DIV
style="FONT: 10pt arial; font-stretch: normal; font-size-adjust: none">To:<A title=ORACLE-L_at_fatcity.com href="mailto:ORACLE-L_at_fatcity.com"> Multiple recipients of list ORACLE-L
<DIV
style="FONT: 10pt arial; font-stretch: normal; font-size-adjust: none">Sent: Monday, February 11, 2002 12:48 PM
<DIV
style="FONT: 10pt arial; font-stretch: normal; font-size-adjust: none">Subject: White space compression in Oracle Hi everyone, I hope this isn't a silly question, but is there any way to make Oracle compress white space in tables. I come from an RDB environment, and when you have a char(x) field in RDB, you can set the compression attribute on the table and any trailing white space in the char(x) column is compressed. I've found when moving some tables with long char fields to Oracle, the tables take up much more space, I suspect because Oracle is not compressing trailing spaces. Because of other constraints, I'm not able to change the fields to varchar2. Thanks for your help,
<FONT face=Arial

  size=2>Beth Received on Tue Feb 12 2002 - 10:48:46 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US