Subject Re: [ib-support] Query Slow
Author Lauri Zoova
Sivaraman Krishnan wrote:
> [...]
> This is the plan for this query:
>
> PLAN (M INDEX (RDB$FOREIGN237))
> PLAN MERGE (SORT (E NATURAL),SORT (JOIN (JOIN (JOIN (JOIN (P NATURAL,I
> INDEX (RDB$FOREIGN237)),D INDEX (RDB$PRIMARY71)),R INDEX (RDB$PRIMARY41)),A
> INDEX (RDB$PRIMARY34))))

Try creating an index for EMPLOYEEMASTER on employeecode and
PATIENTMASTER on opnumber.

> For fetching the records, this query takes 14 seconds.What might be the
> problem?I set the FetchWholeRows property to false.
> Whether i have to change any other properties for speed up this
> query?Otherwise any problem in the index?

Problem is that you don't have an approptiate index (see the 'natural'
in plan) for the two tables. Forget playing with properties.


BR,
Lauri