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: Max lenght of primary key ??

Re: Max lenght of primary key ??

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/06/24
Message-ID: <33afba2c.32959613@newshost>#1/1

The 'block size' is the size of the chunk of data oracle manages. An object (index, table, cluster for example) is called a segment.

a segment is made up of 1 or more extents.

Extents are contigous collections of database blocks.

A database block contains data. typically, a database block belonging to a table would contain part of a row, a row, or many rows on it depending on the size of the rows.

You control the block size when you create the database. The default is 2k but can be sizes such as 2k, 4k, 8k, 16k, and using the VLM option 32k in size. As you increase the size of the block, you increase the amount you can index (4k block would allow for 2k-someoverhead index value sizes, 8k would allow for almost a 4k index key).

You can use server manager (or query the v$parameter table directly) to determine the block size for your database, for example:

SVRMGR> show parameter db_block_size

NAME                                TYPE    VALUE
----------------------------------- ------- ------------------------------
db_block_size                       integer 2048
SVRMGR> On Tue, 24 Jun 1997 09:25:58 +0200, Bas Ven <ven_at_ats.nld.alcatel.nl> wrote:

>Excuse my ignorance, but what is an 'oracle7 block size' ?
>It seems quite a strange restriction that (in my case) I
>can't create a key with a length >= 750 bytes.
>
>
>Brian P. Mac Lean wrote:
>>
>> The Oracle7 Server Reference, Version 7.2, Chapter 5, Page 2/3:
>>
>> Item Type Limit
>>
>> columns index (or 16 columns maximum
>> cluster index)
>>
>> indexes table no limit
>>
>> total size of one-half the Oracle7 block size minus some
>> overhead
>> indexed columns
>>
>> -----
>
>--
>-----------------------------------------------------------------
>J.B. Ven | Alcatel Telecom Nederland
>Phone: +31 (70) 3079130 | P.O. Box 3292
>Fax: +31 (70) 3079191 | NL-2280 GG Rijswijk
>Work: mailto:ven_at_ats.nld.alcatel.nl | The Netherlands
>Home: mailto:basven_at_xs4all.nl |
>-----------------------------------------------------------------

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD

http://govt.us.oracle.com/ -- downloadable utilities



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue Jun 24 1997 - 00:00:00 CDT

Original text of this message

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