Subject | PLAN for stored procedure |
---|---|
Author | Dorin Vasilescu |
Post date | 2004-04-06T11:36:43Z |
Hi
Anyone can explain to me why?
This way:
for select ... from ... where COLUMN like '100-50%' ...
an index on COLUMN is used in query PLAN in a stored procedure and the
execution is very fast
and this way:
for select ... from ... where COLUMN like :sp_parameter ...
no index is used and the query takes very much compared with the first
variant
Thanks
Anyone can explain to me why?
This way:
for select ... from ... where COLUMN like '100-50%' ...
an index on COLUMN is used in query PLAN in a stored procedure and the
execution is very fast
and this way:
for select ... from ... where COLUMN like :sp_parameter ...
no index is used and the query takes very much compared with the first
variant
Thanks