• Gazareth (11/23/2012)


    If speed isn't a issue here, I doubt it'd be worth it. I imagine there's easier ways to get bigger improvements too.

    Best bet would be to test for each case and see!

    Are you using OPTION (RECOMPILE) in your select? I've seen it have pretty dramatic effects on this type of query.

    Cheers

    Well, speed is always somewhat of an issue, isn't it? 🙂 But it's not critical, since this is not intended to be used much. Testing numerous variations in this case is rather a pain, since I have around thirty parameters, any of which may or may not be present. I would have to try numerous field lengths, various placements of the searched-for text in the fields, various combinations of parameters to have any real idea, all of which would take quite a bit of work. If someone already knows the answer, much better use of resources.

    I'm not using the recompile - I keep forgetting about it. I'll give it a try on some of the queries that I have working, but are a little slow. Thanks.