The eq operator is easier to optimize because the type conversions it does are 
much simpler (in particular, exploiting indexes is more difficult). However, 
because 90% of the time people use "=", optimizers are likely to work hard at 
it even though it's intrinsically more difficult.

But getting into the habit of using "eq" is something I would recommend because 
of the better diagnostics when you get things wrong.

Michael Kay
Saxonica


On 25 Jan 2014, at 05:43, Ihe Onwuka <[email protected]> wrote:

> ..are there any drawbacks to always using the general comparison form
> 
> thisThing = ('thatThing')
> 
> rather than
> 
> thisThing eq 'thatThing'
> 
> even when you know that you are dealing with a singleton sequence.
> 
> I am guessing this may be an implementation dependent issue.
> _______________________________________________
> [email protected]
> http://x-query.com/mailman/listinfo/talk


_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to