Subject Re: [firebird-support] Specifying multiple plans
Author Vlad Horsun
> Select statements generate multiple plans, if the select contains
> further selects.
> I need to specify my own plan for such a select statement, but I get an
> error on the second plan:
>
> SELECT
> *
> FROM
> FEE
> WHERE
> NOT EXISTS (SELECT 1 FROM FI WHERE FO = FEE.FUM);
> PLAN (FEE I_GOLD)
> PLAN (FI I_EGG) <-- Token unknown - char 1 PLAN

Try

SELECT
*
FROM
FEE
WHERE
NOT EXISTS (SELECT 1 FROM FI WHERE FO = FEE.FUM PLAN (FI I_EGG) )
PLAN (FEE I_GOLD)


> Also, would an ORDER BY go after or before PLAN?

I don't remember - but you can try both by yourself ;)

Regards,
Vlad