Subject Re: Better procedure for "horizontal table"?
Author Richard Saeger
--- In ib-support@y..., Svein Erling Tysvær
> The only general advice I've gathered, is that you want your
indexes to not
> contain too many duplicate values (e.g. if you index a field named
country,
> you could have an awful lot of persons living in China), then add
the PK at
> the end of that index. I think the reason is that deletes (and
possibly
> inserts) slow down with many duplicates.
Yes, it's my experience, too.

> One thing I suddenly realised: Your PK is (Work_Day, Emp_No). That
means
> that IB has to look up every individual date (since you use BETWEEN
and is
> interested in more than one date) and then try to find the
employee. If
> your PK was the other way around (Emp_No, Work_Day), then IB could
just
> locate the employee once find the first work_day and then traverse
down the
> work_days (since they would be in sequence). I think that would be
worth a
> try.
>
> HTH,
> Set
OK, it could be right, I'll check it.

Thanks for your tips.
Richard