Subject | Re: [firebird-support] Re: foreign keys ans slow insert |
---|---|
Author | Martijn Tonies |
Post date | 2004-09-30T10:14:45Z |
> > > CHECK (VALUE IS NULL OR VALUE IN('CASH', 'CHEQUE','CREDIT'));Nope, not valid.
> >
> > IMO, this really is a FB implementation problem.
>
> I agree with Martijn, but the problem is that it doesn't help German
> today to know that a future implementation of Firebird one day may fix
> it! Today, updating indexes with lots of records is time consuming and
> we end up writing something like
>
> CHECK (VALUE IS NULL OR EXISTS(SELECT * FROM VALUETYPES WHERE
> VALIDVALUE = :VALUE)); //Assuming this to be legal.
> rather than use foreign keys for tables with lots of duplicatesAs I told German, it might be that the new index structure from Arno
> whenever the table with the legal values is not subject to frequent
> updating. Though I didn't think this affected inserts at all, just
> updates and deletes.
improves this behaviour.
That is, IF this is the problem - for which I assume that Helen is right.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com