Subject | Re: [ib-support] Design Advice |
---|---|
Author | Luiz Alves |
Post date | 2002-01-10T23:03:51Z |
Lucas,
Does the indexes created with FK constraints(in T2) with many repeted values
will cause some problems such as poor plan or in selectivity of these
indexes in some situations? Will have other effects?
Luiz.
Does the indexes created with FK constraints(in T2) with many repeted values
will cause some problems such as poor plan or in selectivity of these
indexes in some situations? Will have other effects?
Luiz.
----- Original Message -----
From: "Lucas Franzen" <luc@...>
To: <ib-support@yahoogroups.com>
Sent: Thursday, January 10, 2002 8:51 PM
Subject: Re: [ib-support] Design Advice
>
> > Should I create a foreign key constraint with 'on update cascade' and
'on
> > delete set null' in T1 as:
> >
> > ALTER TABLE T1
> > ADD CONSTRAINT FK_XX
> > FOREIGN KEY ( c2 )
> > REFERENCES T2 ( nr )
> > ON UPDATE CASCADE
> > ON DELETE CASCADE
> >
> > or for performance, I must to do it using triggers em T2 to update T1?
>
>
> Luiz,
>
> using an "action" in a foreign key is nothing else than generating a
> "system trigger" that will save you time to do the coding of a trigger
> on your own.
>
> I doubt there's any speed difference between explicit
> update-/delete-triggers and defining the appropriate actions in the
> foreign key constraint.
>
> Luc.