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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:21:01+00:00 2026-05-13T17:21:01+00:00

We’re inherting a project at work from another office that has closed down. The

  • 0

We’re inherting a project at work from another office that has closed down. The production database is around 150GB and we’re shying away from copying this to 4 dev machines to work from. Are there any scripts, utilities or suggestions on how we can go about capturing a small subset of this data, say 5%, to work with in development – while maintaining integrity of the relationships, key tables, etc?

I guess what I mean by that last part is that if I had an orders table of 500 rows and took a random sampling of 25 rows, I would need to make sure that the 5% of products I took from the products table included any prodcuts need to satisfy those orders….. exceeding 5% if necessary.

I hope I explained that well enough. Anyone have any thoughts?

  • 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-13T17:21:02+00:00Added an answer on May 13, 2026 at 5:21 pm

    I suppose the first step would be to map out what the dependencies / relationships between tables are, and how you find all the dependencies of a given row in a given table.

    Once you’ve done then then you could just take a random sampling of one of your high level tables (e.g. “Customers”) and recursively fetch any dependent rows from dependent tables.

    Rinse and repeat for any tables that didn’t appear in the “dependency heirachy” for the first table that you chose, until you have a sampling from all tables.

    There certainly isn’t going to be a generic script to do this, but I’d say that time spent mapping out the dependencies in the database in this way is time well spent understanding the structure of the database.


    Tbh I’d probably do the reverse instead – empty the database and add records to relevant tables as you find it necessary. There isn’t really any need for developers to always run against a representative sampling of data, and really you should make sure that you regularly test against the full sampling of data anyay, just in case the 95% of the database thats left behind contains the rows that cause problems.

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

Sidebar

Related Questions

No related questions found

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.