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: Magic of varchar2

Re: Magic of varchar2

From: Laurenz Albe <invite_at_spam.to.invalid>
Date: 16 Mar 2006 09:13:01 GMT
Message-ID: <1142500379.409217@proxy.dienste.wien.at>


DA Morgan <damorgan_at_psoug.org> wrote:
> Laurenz Albe wrote:

>> ... and secondly the total size of the index will depend on the length of
>> the indexed columns.

>
> Tried to check it as follows:
>
> create table t1 (
> col1 VARCHAR2(10));
>
> create table t2 (
> col1 VARCHAR2(4000));

[bulk insert]

> CREATE INDEX ix_t1
> ON t1(col1);
>
> CREATE INDEX ix_t2
> ON t2(col1);
>
> exec dbms_stats.gather_schema_stats('UWCLASS', CASCADE=>TRUE);
>
> col segment_name format a30
>
> SELECT segment_name, sum(bytes), sum(blocks)
> FROM user_segments
> WHERE segment_type = 'INDEX'
> GROUP BY segment_name;
>
> SEGMENT_NAME SUM(BYTES) SUM(BLOCKS)
> ------------------------------ ---------- -----------
> IX_T2 1376256 168
> IX_T1 1376256 168
>
> I see no evidence of this being the case.

... then evidently I am wrong with my second claim. Good to know.

Yours,
Laurenz Albe Received on Thu Mar 16 2006 - 03:13:01 CST

Original text of this message

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