I need help with a performance problem I have when running a stored procedure from a web application or a VB form. Sometimes the performance is really bad, but when I run the stored procedure from the QA it's really fast. Running FLUSHPROCINDB solves the performance problem temporarely. The stored procedure I'm executing contains several function and also a temp table. All information in the database is deleted every morning and new records are inserted by using DTS packages. I've tried to use WITH RECOMPILE in the stored procedure but that doesn't help. Any suggestions?