> Hi Ari,
> Was curious about which has better data retrieval efficiency when it comes to
> defining primary keys. Is it better to use sequences or "real" data? As long
> as the column in either selection is unique, does it really matter?
> Thanks in advance for your input.
> Laurie
> Love the website's content - I could do without some of the wallpaper - but I
> like things simple. You asked
----------------------------------------------------------------------------
You are correct - as long as the data is unique, it does not matter for
retrieval. For non-unique indexes it MAY matter. For example, if data is
skewed to be clumped around the letters "A", "B", and "C" and the index has
many levels, it would take longer to retrieve some data compared to other data.
In other words, you have an "unbalanced" index (reverse-key indexes may help
you here).
But for Primary Keys or Unique indexes it does not matter.
Appreciate the comments on the web page. One of these days I'll do an
overhaul and make it more professional in appearance.
Best regards,
-Ari Kaplan
Independent Oracle DBA Consultant
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
<-> For 315+ Oracle tips, visit my Web Page: <->
<-> <->
<-> http://www.arikaplan.com <->
<-> <->
<-> email: akaplan@interaccess.com <->
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
Back to Ari Kaplan's Home Page