Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Table Joins

Re: Table Joins

From: Jared Still <jkstill_at_gmail.com>
Date: Wed, 24 May 2006 16:29:37 -0700
Message-ID: <bf46380605241629t386f15bfpbcf50dc1f8276466@mail.gmail.com>


As others have said, you need proof.

I can hazard a guess as to the origins of this myth.

Sometimes the natural key to a table is composite, that is 1+ columns make of the primary key.

In that case, a number single column key will likely prove faster, simply because there are fewer comparisons to make.

Though I don't know how much faster that might be. It may be too small to measure without a large result set to test.

As an aside, Oracle recommends using SYS_GUID to generate primary keys. Try this and see what data type you get:

 SQL> select sys_guid() from dual;

Try using the dump() function, and look up the datatype code in the datatypes section of the SQL manual.

Or just look at the docs for SYS_GUID.

Jared

On 5/24/06, genegurevich_at_discoverfinancial.com < genegurevich_at_discoverfinancial.com> wrote:
>
> Hi all:
>
> One of my developers insists that joins by numerical fields result in
> better preformance than the joins by
> character fields. I don't remember reading much on this point. Is there
> any
> truth in it?
>
> thank you
>
> Gene Gurevich
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

-- 
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

--
http://www.freelists.org/webpage/oracle-l
Received on Wed May 24 2006 - 18:29:37 CDT

Original text of this message

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