Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2003
    Posts
    50

    Unanswered: Selection of Index by Stored procedure

    Hi,

    Noticed that one of my stored procedures was running slowly.
    So i looked the the explain plan and noticed that it was using a different
    index to what it did when i created it a month or so ago.

    So i dropped and recreated the stored procedure and it started using
    the index it was supposed to, and was running much faster.

    My question is, why did it start using another index for no appartent reason and is there an easy way i can check the rest of my stored procedures to make sure the same isn't happening to them..

    Thanks,
    Dave

  2. #2
    Join Date
    Sep 2003
    Posts
    17
    Hi,

    If at the very beginning, when you created the stored procedure, it was using the correct index, then I would say that only the "with recompile" clause could have changed the query plan (if you haven't dropped the sp in the meantime).

    Regards,
    Ulrike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •