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 6471009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:10:32+00:00 2026-05-25T06:10:32+00:00

I have a table with 100 rows with double as data a1 a2 a3…

  • 0

I have a table with 100 rows with double as data

a1 a2 a3...
---------
1  2   3
23 55  4
2  3   7

I am planning to use UNION ALL to make that table bigger

a1 a2 a3...
---------
1  2   3
23 55  4
2  3   7
1  2   3
23 55  4
2  3   7
1  2   3
23 55  4
2  3   7

This is for testing purposes so what do you recommend, what would be the most efficient way to do this?

  • 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-25T06:10:33+00:00Added an answer on May 25, 2026 at 6:10 am

    This will increase the size of your table exponentially… First it inserts x records, then 2x, then 4x, then 8x… You could add distinct or top n, etc. to the select if you just want to add the same number of records each time.

    DECLARE @count int
    DECLARE @max int
    
    SET @count int = 1
    SET @max = 10
    
    WHILE @count < @max
    BEGIN
       INSERT INTO myTable (a1, a2, a3)
       SELECT a1, a2, a3 FROM myTable
       SET @count = @count + 1
    END
    

    BTW — not sure what you’re trying to test, but you might add something besides whole numbers to your data set — e.g., 1.01, .99, 55.7, 60, etc.

    EDIT

    Per your comment — if you really want to use union all then…

    INSERT INTO myTABLE (a1, a2, a3)
    SELECT a1, a2, a3 FROM
    (
    SELECT a1, a2, a3 FROM myTable
    UNION ALL
    SELECT a1, a2, a3 FROM myTable
    UNION ALL
    SELECT a1, a2, a3 FROM myTable
    ...
    ) a
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table that looks like this: id count 1 100 2 50
Guys I'm stumped on this one, I have a large table with 100,000 rows
I have a table with about 100.000 rows that used to look more or
Say you have a MySQL 5.0 MyISAM table with 100 million rows, with one
I have a table like this (Oracle, 10) Account Bookdate Amount 1 20080101 100
I have a varchar(100) column in a table that contains a mix of integers
I have some 50 pages of html which have around 100-plus rows of data
I have a data table containing two columns (pattern and neworder) and cca 100
I'm currently have around 100 rows in a table on my website, which include
I have a table in which approx 100,000 rows are added every day. I

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.