Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 846373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:36:11+00:00 2026-05-15T06:36:11+00:00

A similar question has been asked, but since it always depends, I’m asking for

  • 0

A similar question has been asked, but since it always depends, I’m asking for my specific situation separately.

I have a web-site page that shows some data that comes from a database, and to generate the data from that database I have to do some fairly complex multiple joins queries.

The data is being updated once a day (nightly).

I would like to pre-generate the data for the said view to speed up the page access.

For that I am creating a table that contains exact data I need.

Question: for my situation, is it reasonable to do complete table wipe followed by insert? or should I do update,insert?

SQL wise seems like DELETE + INSERT will be easier (INSERT part is a single SQL expression).

EDIT: RDBMS: MS SQL Server 2008 Ent

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T06:36:11+00:00Added an answer on May 15, 2026 at 6:36 am

    TRUNCATE will be faster than delete, so if you need to empty a table do that instead

    You didn’t specify your RDBMS vendor but some of them also have MERGE/UPSERT commands This enables you do update the table if the data exists and insert if it doesn’t

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

a similar question has been asked before , but the answers suggested a workaround
A similar question has been asked before by someone else , but there were
I'm sorry, I'm sure a similar question has already been asked but I'm afraid
I know a similar question on this topic has been asked, but doesn't look
A similar question has been asked: MSDN subscriptions on the cheap? , but I
Hey a similar question has been asked before, but none that answers mine exactly.
I'm afraid very similar question has been asked already here , but for some
I know this question has been asked in a similar fashion before, but I
Similar question has been asked many times. But I still don't get why I
I know a similar question has already been asked, but that retrieves all the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.