Showing posts with label col1. Show all posts
Showing posts with label col1. Show all posts

Tuesday, March 20, 2012

Plan Guide

Is it possible to do something like this with a query plan?
I want to get
Query1
select * from tableA
where col1 like '%value%'
to run like
Query2
select * from tableA
where contains(col1, "value")
using a plan_guide.
Basically what's happening is a 3rd party product is executing a query that
looks like query1, which is searching on a text field (col1).
I wanted to try a full text index, but I don't think that I can get the
vendor to change their code to use a contains instead.
Any ideas?
Tia
--
MGEgads, why isn't the vendor using stored procedures?
"Hurme" <michael.geles@.thomson.com> wrote in message
news:FD780483-2D13-4284-8911-EF08FA332560@.microsoft.com...
> Is it possible to do something like this with a query plan?
> I want to get
> Query1
> select * from tableA
> where col1 like '%value%'
> to run like
> Query2
> select * from tableA
> where contains(col1, "value")
> using a plan_guide.
> Basically what's happening is a 3rd party product is executing a query
> that
> looks like query1, which is searching on a text field (col1).
> I wanted to try a full text index, but I don't think that I can get the
> vendor to change their code to use a contains instead.
> Any ideas?
> Tia
> --
> MG|||"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:eXbLZijfIHA.5560@.TK2MSFTNGP04.phx.gbl...
> Egads, why isn't the vendor using stored procedures?
LOL with SQL statements hardwired into the client-side code the customer
can't go in and make changes like this to the code

Plan Guide

Is it possible to do something like this with a query plan?
I want to get
Query1
select * from tableA
where col1 like '%value%'
to run like
Query2
select * from tableA
where contains(col1, "value")
using a plan_guide.
Basically what's happening is a 3rd party product is executing a query that
looks like query1, which is searching on a text field (col1).
I wanted to try a full text index, but I don't think that I can get the
vendor to change their code to use a contains instead.
Any ideas?
Tia
MG
Egads, why isn't the vendor using stored procedures?
"Hurme" <michael.geles@.thomson.com> wrote in message
news:FD780483-2D13-4284-8911-EF08FA332560@.microsoft.com...
> Is it possible to do something like this with a query plan?
> I want to get
> Query1
> select * from tableA
> where col1 like '%value%'
> to run like
> Query2
> select * from tableA
> where contains(col1, "value")
> using a plan_guide.
> Basically what's happening is a 3rd party product is executing a query
> that
> looks like query1, which is searching on a text field (col1).
> I wanted to try a full text index, but I don't think that I can get the
> vendor to change their code to use a contains instead.
> Any ideas?
> Tia
> --
> MG
|||"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:eXbLZijfIHA.5560@.TK2MSFTNGP04.phx.gbl...
> Egads, why isn't the vendor using stored procedures?
LOL with SQL statements hardwired into the client-side code the customer
can't go in and make changes like this to the code