Subject | Re: [firebird-support] Order of WHERE operations |
---|---|
Author | Ann W. Harrison |
Post date | 2005-01-13T23:33:26Z |
Rick DeBay wrote:
to force this evaluation with a plan.
Regards,
Ann
> In what order to WHERE statements get evaluated? I want to make sureThe order of evaluation is determined by the optimizer. You may be able
> the existence clause gets evaluated first.
>
> INSERT INTO PURCH_ORDER (PO,REPLENISH_GRP,ACCOUNT,DIST_CTR,SUBMITTED)
> SELECT ?,REPLENISH_GRP_ID,?,?,?
> FROM V_REPLENISH_GRP
> WHERE SUPPLIER_ACCT=?
> AND NOT EXISTS (SELECT ID FROM PURCH_ORDER WHERE PO=?);
>
to force this evaluation with a plan.
Regards,
Ann