> Your second query executes in a fraction of a second - but only because the 
> optimizer successfully rewrites it to use the TEXT index.

Exactly. A single context item reference (".") can be rewritten for
index if the database statistics indicate that the addressed element –
in your case order-id – has no other descendant elements. If it did
have, you would get different results: see e.g.:

  <order-id>X<a/>Y</order-id> = 'XY' → true

In your case, I assume that your database statistics have got outdated
(e.g. due to updates), or there may be order-id elements with elements
as children.

Reply via email to