Keeping an ad hoc plan in Cache - sp_executesql?- Pic attached

  • GilaMonster (2/6/2009)


    Indeed, and by too many indexes, we're not talking 2 or 3 here. It'll take more than that to cause a serious slowdown of the inserts. If one index slows down your inserts badly, then you have bigger problems than a badly-performing select.

    On the other hand, it just occurs to me, we're assuming a well formed index too. A badly put together index consisting of 8 different varchar(75) columns isn't going to be helping too much on inserts or selects.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Thank you all VERY much for taking the time to help me. Good karma to all of you.

    You know, after getting a little sleep..I think the overall theme here is correct - this really should be done within a query.

    I'll have to find out why they think it can't be done. Guessing it's because of the ad hoc part after the 'where' checkbox.

    I asked and they said it couldn't be done, but after reading eveyones comments I did a little research and it certainly seems like it could be done.

    http://www.4guysfromrolla.com/webtech/102300-1.shtml

    I don't know anything about web/asp kinda coding tho..guessing I could write the proc without needing web/asp coding knowledge?

    I was thinking of having them point the app (based on my user) to my test DB, then I could start writing the proc, but they would still have to change it on the web side to point to my proc(s) correct? The problem there is web folks are in CA I'm in FL, but that can be worked out.

  • 🙂

Viewing 3 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic. Login to reply