Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Optimizing long string foreign keys
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