0

I have never done this before, and I'm not sure if it is possible. Basically, I have a big query that takes around 1-2 minutes to run. What I'd like to do is:

  • automatically execute and put result into a table every hour.
  • My webpage will then query against the temporary table instead, which should be quicker.

I am looking for the steps to do this like. First, create a stored procedure. Second, setup somewhere to run the store procedure automatically. I'm not sure how to proceed — can you suggest how?

Jonathan Leffler
  • 698,132
  • 130
  • 858
  • 1,229
Milacay
  • 1,377
  • 6
  • 31
  • 53

1 Answers1

0

SQL server supports running scheduled jobs. You can look here.

http://technet.microsoft.com/en-us/library/ms190268%28v=sql.100%29.aspx

Also check this question, it should give you
a very good idea of the steps you need to take.

How to run a stored procedure in sql server every hour?

Community
  • 1
  • 1
peter.petrov
  • 36,377
  • 12
  • 75
  • 137