John Lister wrote:
> However it seems that other optimisations can't be made for example it
> doesn't seem possible to tell the server that parameter 1 is always
> going to be an int and therefore it should be using index A. The current
> implementation may not use index A as it is unaware as to the type of
> the supplied parameter. Perhaps in this case the execution planner
> should pick the parameters for the most optimal plan and return the
> types during the parse and let the driver convert the data to what the
> server requires...
No it's not a problem with types at all, parameter types are fixed at
the point the named statement is created.
It's all about index selectivity statistics.
-O