Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Maximum height of an Oracle B-tree index
For the record, Steve did not make it to blevel of 20, he made it to 14.
Jared
"Jacques Kilchoer" <Jacques.Kilchoer_at_quest.com>
Sent by: oracle-l-bounce_at_freelists.org
03/10/2004 07:01 PM
Please respond to oracle-l
To: <oracle-l_at_freelists.org> cc: "Richard Foote" <richard.foote_at_bigpond.com> Subject: RE: Maximum height of an Oracle B-tree index
-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Richard Foote
Sent: mercredi, 10. mars 2004 14:31
To: oracle-l_at_freelists.org
Subject: Re: Maximum height of an Oracle B-tree index
Hi Jared/Tin and all,
I believe that was precisely how Steve managed it, very small block size, large pctfree, a bit of cleverness and heaps of storage (until it ran out). He mentioned it btw at the Hotsos tuning class in Sydney last year.
So far the best I've heard privately is height of 6.
Can anyone do better ?
Better than 6? Yes. Better than Steve Adams' record of 20? No, but my
tablespace only had 100MB free. I got up to belevel = 14 before running
out of space.
I didn't try anything clever, all I did was: 2K blocksize database, large
index (maximum length for the Oracle version), pctfree 99, and inserting
the index values in descending order.
Sun Solaris 2.8
Oracle 8.0.6
db_block_size 2K
Index size = 79 MB, blevel = 14
Proof:
SQL> select value
2 from v$parameter
3 where name = 'db_block_size' ;
VALUE
SQL> column segment_name format a12
SQL> select segment_name, segment_type, bytes, blocks, extents
2 from user_segments
3 where (segment_name = 'T' and segment_type = 'TABLE')
4 or (segment_name = 'I' and segment_type = 'INDEX') ;
SEGMENT_NAME SEGMENT_TYPE BYTES BLOCKS EXTENTS
------------ ----------------- --------- --------- --------- T TABLE 20738048 10126 157 I INDEX 82681856 40372 626
SQL> analyze index i compute statistics ;
Analizzato indice.
SQL> select
2 blevel, leaf_blocks, distinct_keys, 3 avg_leaf_blocks_per_key, 4 avg_data_blocks_per_key, 5 clustering_factor, num_rows, 6 sample_size, 7 to_char (last_analyzed, 'SYYYY/MM/DD HH24:MI:SS') as last_analyzed8 from user_indexes
BLEVEL LEAF_BLOCKS DISTINCT_KEYS AVG_LEAF_BLOCKS_PER_KEY AVG_DATA_BLOCKS_PER_KEY
--------- ----------- ------------- ----------------------- -----------------------
----------------- --------- ----------- -------------------- 14 20189 20000 1 1 10000 20000 0 2004/03/10 18:50:17SQL>
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Wed Mar 10 2004 - 23:33:26 CST
![]() |
![]() |