Query Analyzer & Wrong Execution Plans

  • I have a query that once put directly into the Query Analyzer takes 1 second while using my Index Views. This is extreamly fast.

    If i put the same query inside a stored procedure and execute the stored procedure inside of Query Analyzer it takes over 30 seconds!!

    the stored procedure uses a completely different execution plan? It is like it isn't reading the statistics or something. thanks.

    I have cleared the bufferes the cache, updated the statistics... same rsults. I have had this happen on multiple queries. Where once put into a SP it slows down tramindisly. Note: This is also in the query analyzer (just calling the SP)

  • Can you post the coe for both and the related execution plans (Use SET SHOWPLAN_TEXT ON). Just want to compare.

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

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