Subject RE: [firebird-support] Re: Foreign Key on 2 or more columns
Author Alan McDonald
> hmm, sorry my explanation was not clear
>
> I have 2 table
>
> Contact
> Contact_archive
>
> where i put in contact_archive all the contact that are "archived".
>
> Because table contact we do some intensive select order by query and i
> don't want that the archived contact slow downs the process (because
> with them the table contact will be very very big)
>
> table contact_archive is exactly the same structure as table contact
>
> but the probleme you understand is the foreign key :( so i need a way
> out to make them working.
>
> thanks you by advance
> stephane

how big is very big? I doubt it would be a problem.
Put them all in one table, Use an archive flag, and make your normal
selectas WHERE ARCHIVEFLAG IS FALSE
put an index on the flag field
then test your selects for speed. you might be surprised.
Alan