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

  • SEARCH
  • Home
  • 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 8266643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:14:09+00:00 2026-06-08T05:14:09+00:00

Need to generate some test data. This insert is 800,000 X 1,000. I know

  • 0

Need to generate some test data. This insert is 800,000 X 1,000. I know a lot but this is a real application where the random will be a calculated number.

How can I break this up so the transaction log does not fill up?

insert into sIDcrossMatch
  select 
  docSVsys1.sID, docSVsys2.sID, Abs(Checksum(NewId())) % 100 As RandomInteger 
  from docSVsys as docSVsys1 
  join docSVsys as docSVsys2
  on docSVsys1.sID <> docSVsys2.sID 
  where docSVsys1.sID < 1000
  order by docSVsys1.sID, docSVsys2.sID

It will insert one docSVsys1.sID without filling up the transaction log.

  • 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-06-08T05:14:11+00:00Added an answer on June 8, 2026 at 5:14 am

    Since that is your test database, make sure your Recovery model to Simple first and then let log grow as much as you could provide space to it (add more files if needed). And be sure that You understand consequences of these settings.

    Next step, or first step if you can’t set recovery model and allow log to grow, split your insert statement into multiple insert statements by adding where clause like this:

    1. insert #1: where docSVsys1.sID % 2 = 0 /* % means moduo */
    2. insert #2: where docSVsys1.sID % 2 = 1 /* % means moduo */

    if that would not be enough, increase divider (2) and add more insert statements. The idea behind multiple inserts is to use less log space and reuse log space.

    Or, if possible for You, use SSIS and have one source component with your select query and one destination component (don’t forget to set batch size).

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

Sidebar

Related Questions

I have this in my controller. I need my view to generate some HTML,
I need to generate a file for Excel, some of the values in this
Problem I have some pages that need dynamic data from website to generate output
I'm using freemarker to generate a freemarker template. But I need some way to
I am trying to generate some test data. Say I have 1000 appointments that
I just need to generate some test content for my template. Something like: {{
We need to generate reports that pull in lots of data, run some calculations
I need to generate some token that can only take on a range of
I need to generate some 5x6 matrices in MATLAB. They need to consist of
Hi I need to generate some files on server side and return them to

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.