sp_create_plan_guide_from_handle and query hints

  • winash


    Points: 11446

    I was playing around with plan guides and am facing a problem.

    I'm trying to create a plan guide using sp_create_plan_guide_from_handle and am unable to figure out where to provide my query hint using this.

    I'm able to create a plan guide with a hint using sp_create_plan_guide (using the @hints parameter) but I don't find a similar parameter for sp_create_plan_guide_from_handle. I've tried searching for information and haven't found much on how to get this to work.

    Any ideas on how to provide a query hint using sp_create_plan_guide_from_handle?

  • winash


    Points: 11446

    After some more re-reading of BOL - it looks like this is mainly used to freeze a plan and not to provide query hints.

    From BOL:

    You can use this stored procedure to ensure the query optimizer always uses a specific query plan for a specified query

    Too bad there isn't a "recall" feature in the forums 🙂

  • AlBran LVP

    SSC Eights!

    Points: 857

    I had the same confusion, so I'm glad you didn't "recall" the post. 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

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