I'm working with a realtime reporting database built on sql server. In this particular case I'm working on data from an Avaya swtich, but that's less important.
Basically, the data is stored in two formats. Historical which is sumarized by half hour and realtime which covers the current half hour. Right now, I have a job set to pull the historical data every half hour (previous completed interval) and keep a running summary of the midnight to last completed interval. The the realtime system feeds data every 15 seconds on the current interval. Finally, I have a view to summarize the data into a cumulative total (midnight to present). The problem is, said view takes about 3-4 seconds to generate. The Web pages that query this data sometimes have 30-40 hits to this view and can take 20+ seconds to load. As they refresh every 30 seconds this is not really workable.
So, I'm trying to speed up the view, or find another method. The realtime data updates almost constantly (every 15 seconds from multiple switches) which means the view has to re-sumarize every time it's accessed. What I'm looking to do is either 1) force the view to stay cached for say 20 seconds or 2) update a table with the cumulative data every 20 seconds.
Obviously (I think), I can't schedule a job to run every 20 seconds, so is there another way I can achieve this?
Basically, the data is stored in two formats. Historical which is sumarized by half hour and realtime which covers the current half hour. Right now, I have a job set to pull the historical data every half hour (previous completed interval) and keep a running summary of the midnight to last completed interval. The the realtime system feeds data every 15 seconds on the current interval. Finally, I have a view to summarize the data into a cumulative total (midnight to present). The problem is, said view takes about 3-4 seconds to generate. The Web pages that query this data sometimes have 30-40 hits to this view and can take 20+ seconds to load. As they refresh every 30 seconds this is not really workable.
So, I'm trying to speed up the view, or find another method. The realtime data updates almost constantly (every 15 seconds from multiple switches) which means the view has to re-sumarize every time it's accessed. What I'm looking to do is either 1) force the view to stay cached for say 20 seconds or 2) update a table with the cumulative data every 20 seconds.
Obviously (I think), I can't schedule a job to run every 20 seconds, so is there another way I can achieve this?