Hi Stefan,
A good rule of thumb is "The shorter the key the better the
performance." The reason is to keep as many keys in a data block as you can
in order to minimize the number of index blocks that have to be read to
locate the data you are after. Given that integer (NUMBER) results in the
least amount of storage space for any given value you should use NUMBER if
possible, if not use VARCHAR2.
regards
Jerry Gitomer
Stefan Herz wrote in message <374BDCC5.31151BA3_at_zdf.de>...
>Hello,
>two Questions i'm asking myself, may some of you have any ideas.
>For my Oracle Datenbase(7.3.4), later 8i i've to look for the best kind
>of keys for my tables.
>
>Question 1: Has the datatype of a key influence on the performance at
>skipping, data retrieving, adding or deleting?
>Should i use LONG,INTEGER oder VARCHAR(256), whats about a compound key?
>
>Questions 2: If i want to have a world wide unique key, e.g. using an
>URL and a sequence. Should i take a VARCHAR(256) or a compound key with
>a VARCHAR(xyz) and an INTEGER or LONG .
>According to Question 1.
>
>Are there any other criteria for the choice of a key type, instead
>ofunique,performance and flexibility ?
>
>Thanks for all of the advices may given
>regards Stefan
>
>
Received on Wed May 26 1999 - 11:00:38 CDT