0

I have a scenario where I built an ASP.NET MVC application that queries a SQL Server stored procedure to get data back. This is an issue as the procedure gets executed each time a call is made with the application, which inevitably slows down the application.

I am looking to create a job in SQL Server where I can read the procedure once a day and write to the database, then I will query the new table from the web app. Is it possible to create a job in SQL Server to archive this and schedule it to run once daily.

Can I get pointed into the wrote direction on this approach. I have created a job in SQL Server before, just not once that reads a procedure and write to a different database table.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Papi
  • 555
  • 13
  • 40
  • Yes, possible. You can start here: http://stackoverflow.com/questions/12621469/sql-server-insert-stored-procedure-results-into-table-based-on-parameters – shree.pat18 Nov 13 '15 at 09:14
  • It would probably be easier and more efficient to just **cache** the results you get back from the stored procedure inside ASP.NET (using `System.Web.Caching`) and then just returns those values, instead of executing the stored procedure again – marc_s Nov 13 '15 at 09:14

0 Answers0