Subject Re: Mystery
Author Tom Conlon
Hi Svein,

Thanks for you answer.

> I suspect you would get far better performance by changing to
> WHERE ((s.POSTCODE||'' STARTING WITH 'MK'))

Unfortunately Not:

Plan
PLAN JOIN (T1 INDEX (RDB$FOREIGN81),C INDEX (RDB$PRIMARY15),S INDEX
(RDB$PRIMARY13),CO INDEX (RDB$PRIMARY8))

Adapted Plan
PLAN JOIN (T1 INDEX (FK_CLNTSKILL1),C INDEX (PK_CLIENT),S INDEX
(PK_SITE),CO INDEX (PK_COMPANY))

------ Performance info ------
Prepare time = 0ms
Execute time = 5m 25s 500ms (ouch!)

I've validated the DB and aok, it doesn't make sense...

Tom