Replace calculation in cursor with set based logic

  • The source data Price and Factor come from 2 different tables. If I need to store data (and I think I do)  I would create a new table.

    The data could be revised. The oldest data is from 40+ years. The data that could change would likely be a couple of recent months at most.

    So I expect to move towards a stored procedure approach which would process and store the calculations and run daily. Once the initial load is done I expect I would update the calculations during the most recent 2 or 3 months.

    I think the recursive query will perform well if I can limit the anchor query so I expect to apply the 2/3 month window in the anchor query. Or I could keep the cursor. I haven't done this testing yet.

Viewing post 16 (of 16 total)

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