• Number 1, read everything Kevin said. Re-read it and ask questions if needed.

    Now let's break down the next steps:

    1. What program or process is calling this proc? It is important to know if the suggestion to "bulk the data in and then update the table in a set-based way" is doable given your system setup.

    2. Script out the definition for the table hourlies including all indexes and constraints and post to this thread.

    3. Get some of the actual input values sent into this proc by the calling program and execute it while capturing the Actual Execution Plan in SSMS. Save out the Execution Plan as a .sqlplan file and attach it to this thread so we can see where the whole thing is slowing down.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato