Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedure Parameters problem - Takes too long

Status
Not open for further replies.

camaleonCHILE

IS-IT--Management
Jul 7, 2005
20
0
0
Hi, I've some Sql code with a INNER JOIN for two tables. I put this code inside a Stored Procedure. This SP has 2 parameters (varchar both) that work like filters. When I run the SP sending the parameters, this takes up to 2 minutes for the results. When I execute the same code but now with 2 variables with the same type and value than the parameters below, the results appear in 3-7 seconds.

I saw both execution plans in then Query Analyzer(the code with parameters and with variables), and they are different.

¿ what can I do ? ( I trust in you, masters)

thanks in advance.

Regards

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top