Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2008

    Unanswered: keeping a table up to date

    Beginner question here. Have SQL Server 2005.

    For a search on my site I made this view of the information I wanted searchable. It works well, but the view is slow to build. So I dumped the results in a table and now it's nice and fast.

    I currently update it by deleting the table, and re-dumping the results into a new table of the same name (takes search offline for a few minutes). It's clunky, and I'm sure there's an easier way. Because of this, I rarely update. I'd love to every day, or even twice a day. I can write a php/asp script to run the view results and insert anything into the table that's not there already, but that seemed a little clunky too (and not fast).

    Is there any neat script that I can run each night to empty the table and then fill it with the view results? I know it's basic actually, but I must be searching for the wrong terms in Google because I'm just getting awful results there.

  2. #2
    Join Date
    Jan 2004
    In a large office with bad lighting
    This is commonly called a "delta" process.

    You accumulate your inserts updates and deletes during your busy hours. Then, during off hours, you apply them from your holding table to the table used to provide data to your front end service. You do deletes, updates, and inserts based on the contents of your "delta" tab;e.

    Here is some basic info:

    -- This is all just a Figment of my Imagination --

  3. #3
    Join Date
    Nov 2002

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts