Subject | Re: Better procedure for "horizontal table"? |
---|---|
Author | Richard Saeger |
Post date | 2001-09-07T18:12:16Z |
--- In ib-support@y..., Svein Erling Tysvær
Thanks for your tips.
Richard
> The only general advice I've gathered, is that you want yourindexes to not
> contain too many duplicate values (e.g. if you index a field namedcountry,
> you could have an awful lot of persons living in China), then addthe PK at
> the end of that index. I think the reason is that deletes (andpossibly
> inserts) slow down with many duplicates.Yes, it's my experience, too.
> One thing I suddenly realised: Your PK is (Work_Day, Emp_No). Thatmeans
> that IB has to look up every individual date (since you use BETWEENand is
> interested in more than one date) and then try to find theemployee. If
> your PK was the other way around (Emp_No, Work_Day), then IB couldjust
> locate the employee once find the first work_day and then traversedown the
> work_days (since they would be in sequence). I think that would beworth a
> try.OK, it could be right, I'll check it.
>
> HTH,
> Set
Thanks for your tips.
Richard