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 -> Re: CHAR vs VARCHAR2 and BITMAP efficiency

Re: CHAR vs VARCHAR2 and BITMAP efficiency

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Tue, 30 Jul 2002 18:48:04 +0100
Message-ID: <3D46D154.7C4B@yahoo.com>


sheepish wrote:
>
> 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

I would say any choice of datatype would pale into insignificance compared to pruduent use of "minimise records per block"

The above statemment made of course with no evidence or testing to back it up :-)

hth
connor

-- 
==============================
Connor McDonald

http://www.oracledba.co.uk

"Some days you're the pigeon, some days you're the statue..."
Received on Tue Jul 30 2002 - 12:48:04 CDT

Original text of this message

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