Java Mailing List Archive

http://www.dba.5341.com/

Home » Home (12/2007) » oracle l »

Re: Table Joins

Jared Still

2006-05-24

Replies:

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@discoverfinancial.com <genegurevich@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
©2008 dba.5341.com - Jax Systems, LLC, U.S.A.