Subject Re: [ib-support] Is this necessary?
...and you should not create indexes for primary key fields (descending
indexes are OK, but the optimizer can be confused with indexes equalling
the pk).

Set

>CREATE UNIQUE INDEX XPKTab2 ON Tab2
>(
> CodeT2
>);
>
>ALTER TABLE Tab2 ADD PRIMARY KEY (CodeT2);