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 -> Optimizing long string foreign keys

Optimizing long string foreign keys

From: Boris Pelakh <pelakh_at_yahoo.com>
Date: 7 Aug 2003 06:47:22 -0700
Message-ID: <44ec9ada.0308070547.7fb3611b@posting.google.com>


I have a schema design problem with which I would appreciate some advice. In my setup I have two tables, each having a very long string primary key (can easily be 1KB). More so, each row in table B refers to a row in Table A, so it has
to store a copy of the TableA.key as well. I am concerned about performance,
with the duplicate storage, the very long records, and the very long key.

How can I resolve this problem ? I have considered auto-sequencing table A,
and storing just the sequence number as a reference in table B, but I have
a frequent need to do the following

 select <fields> from TableB where TableA_key = '<some value>';

which would now force a JOIN. Is there a better solution ?

I appreciate any help,
Boris Received on Thu Aug 07 2003 - 08:47:22 CDT

Original text of this message

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