Foreign keys with non-matching column definitions [message #65509] |
Mon, 11 October 2004 02:26 |
Tine
Messages: 1 Registered: October 2004
|
Junior Member |
|
|
I have read that foreign keys with non-matching column definitions causes poor performance because it forces data conversion.
I wonder if we get a performance degradation when as an example the parent table column definition is set to number(9) and the foreign key column definition is set to number(3)?
Thanks
Tine
|
|
|
Re: Foreign keys with non-matching column definitions [message #65511 is a reply to message #65509] |
Mon, 11 October 2004 04:38 |
Art Metzer
Messages: 2480 Registered: December 2002
|
Senior Member |
|
|
----------------------------------------------------------------------
I wonder if we get a performance degradation when...the parent table column definition is set to number(9) and the foreign key column definition is set to number(3)?
----------------------------------------------------------------------
I doubt it.
Please read the AskTom article "Altering table columns to a smaller size", in which Tom concludes- benchmark these things, get hard and fast numbers before you go about doing long painful changes
- stop doing your conversion [[from NUMBER to NUMBER(12)]]-- it is quite simply "not worth it"
After all, a NUMBER(9) is stored in the database exactly the same as a NUMBER(3) is.
I think the mismatched foreign-key column definitions that you've read about refer to conversions such as between DATE and VARCHAR2, or between NUMBER and VARCHAR2.
|
|
|