Subject Re: [ib-support] Helen: Low Selectivity Problem
Author Helen Borrie
At 12:18 AM 27-08-02 +0000, you wrote:
>Hi Helen,
>I was just reading your reply (in IBObjects group) to the Data
>Integrity post, and in it you mentioned that if a lookup table has
>few records compared to the main table, do not use formal foreign
>keys as this will give poor performance.
>I do not understand this at all, as that is how I thought things
>were to be setup for the purpose of referential integrity.
>I have quite a few lookups (about 10), each with between 2 - 10
>records, which all reference about 10 other large tables in my db.
>Could you please explain why this will give poor performance, and
>what the best way to maintain referential integrity will be if I am
>not to use formal foreign keys?

See my posting yesterday in response to Raymond Kennington's thread
"Foreign keys and low selectivity".

Also (when the Atkin server comes back to life) search the archives on the
word "selectivity".

As for referential integrity, it is perfectly possible to manage this
yourself with triggers. I don't have time to "write the manual" for you
but trying searching the net for articles about the concept - it's a
structural issue rather than one that's database-specific. See also CREATE
EXCEPTION, a handy tool in writing RI triggers...