Subject | Re: [firebird-support] Re: LIKE operator inside stored procedure |
---|---|
Author | Martijn Tonies |
Post date | 2004-04-22T11:39:15Z |
Hi Dorin,
It's slightly more complex/different ;-)
BLR for the procedure/SQL), but only at execution time.
However, parameters are not bound when
creating the execution plan. So when a value holds:
LIKE 'A%', the optimizer can switch to use indices, while
when using a parameter:
LIKE :param - it doesn't know it's value yet, so it decides
not to use an index.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
It's slightly more complex/different ;-)
> SimpleThe execution plan isn't created at compile time (= creating
> Because, speaking of execution plan, the value can't be known at
> compile time.
> It can be '%something%' at runtime, so index optimization is not
> possible.
BLR for the procedure/SQL), but only at execution time.
However, parameters are not bound when
creating the execution plan. So when a value holds:
LIKE 'A%', the optimizer can switch to use indices, while
when using a parameter:
LIKE :param - it doesn't know it's value yet, so it decides
not to use an index.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com