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

Home -> Community -> Usenet -> c.d.o.server -> CHAR vs VARCHAR2 and BITMAP efficiency

CHAR vs VARCHAR2 and BITMAP efficiency

From: sheepish <rjc4687_at_hotmail.com>
Date: 30 Jul 2002 08:29:51 -0700
Message-ID: <1c0a0a83.0207300729.63a34ea6@posting.google.com>


Sort of related to the earlier CHAR vs VARCHAR2 thread.

Having probably never used CHAR I had this thought.

When a bitamp index is being created Oracle needs to calculate the maximum number of slots per block for a given table so it knows how many values there are for the bitmap for the index on that block.

I know marking columns as NOT NULL would let Oracle know there would be at least
1 byte in that column and so possibly decrease the maximum number of slots calculated. If I had a column that would always be 10 characters long would CHAR(10) be better than VARCHAR2(10) for getting smaller bitmaps created given that a definitely longer row means fewer slots per block?

May all be hypothetical as far as performance goes but I'm interested in the internals. I know I could just try and if it works I should see a smaller created index, but basically I'm too lazy, unless no one knows in which case curiosity may get the better of me.

Rob Cowell
DBA
Cardiff, UK Received on Tue Jul 30 2002 - 10:29:51 CDT

Original text of this message

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