Subject | RE: [firebird-support] Why PLAN token is not allowed after ORDER BY? |
---|---|
Author | Svein Erling Tysvær |
Post date | 2012-06-04T07:29:30Z |
>I consider this issue resolved with one side note that having PLAN hint which affects ORDER BY executionDon't forget UNION, Alec. I.e.
>before ORDER BY clause is misleading.
select * from T
where a = 1
PLAN (T INDEX (IDX_TA))
union
select * from T
where a = 2
PLAN (T INDEX (IDX_TA))
order by 1
makes it quite simple to see why the PLAN clause has to be before the ORDER BY. Of course, I have no problems understanding that having the option of specifying ORDER BY before PLAN in simple selects could be easier to read (particularly when the plan involves ORDER as opposed to INDEX).
Set