Have you tried passing the values as parameters instead? For example
Select * from mytable where myvalue=1 Then Select * from mytable where myvalue=2 Wont be optimised by sql server But Lnvalue=1 Select * from mytable where myvalue=?lnvalue Lnvalue=2 Select * from mytable where myvalue=?lnvalue Will ... I think! -----Original Message----- From: ProfoxTech [mailto:[email protected]] On Behalf Of Gérard Lochon Sent: 12 February 2013 09:00 To: [email protected] Subject: Re: SQL Server optimisation From: "Graham Brown" <[email protected]> > > I reckon they are just being a little lazy so instead of choosing the > search from a combobox they just leave it set at any field. > You could restrict the search using a dictionary of skeletons. For example, if the criteria is "SMITH" [ formal A(5)] , it won't fit with a field constructed like "123AX5501" [ formal N(3)A(2)N(4) ], so it is not neccesary to search thru that field ... [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

