Subject Re: [firebird-support] SQL Performance problem
Author Gary Benade
SupOrdrRef is the PK of SupplyOrder and an indexed field in
> SupplyLine. The sub select runs in 15ms by itself.

Martin

how quick is this query:

SELECT so.SupOrdrRef, OrderNo, OrderDate, so.Comment
FROM SupplyOrder so
WHERE EntityRef = 8

How many rows does the above query return?
I'm thinking you may need an index on SupplyOrder(EntityRef).

Regards
Gary