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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:02:56+00:00 2026-05-26T12:02:56+00:00

For testing code I’m copying data from a live database to a test database

  • 0

For testing code I’m copying data from a live database to a test database using SQLYog’s “Copy to different host” option. Most of the time, this is okay. But for some tables the dataset is absolutely huge and I only need a relatively small subset of the data for testing. The Copy to different host dialog gives you the option of copying structure only or structure and data.

If I only want partial data, I have to run a select * on table where condition query, export the results as an SQL query, import that query into the test host and run it. While this works, it’s not exactly a fun procedure, especially given circumstances where even the “small” subset of test data is still a lot of rows. If some of the data was already copied over than that adds further complications, as I have to write a query to get a list of keys on the target and then add a where key not in (key list) condition onto the main condition.

Is there a way to get the “copy to different host” feature to only selectively copy rows to the target database?

  • 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-26T12:02:57+00:00Added an answer on May 26, 2026 at 12:02 pm

    It is currently not possible to use a WHERE condition on individual rows in the SQLyog copy tool. As long as only a single table is selected for copy it is OK, but with more tables it won’t make sense.

    What you can do now is to create a small ‘dummy’ table on source and copy this one. The workflow could be like:

    1) CREATE TABLE newtable AS SELECT * FROM oldtable WHERE …

    2) Now copy newtable using SQLyog GUI and next drop it on source if required

    3) RENAME newtable on target if required

    This will reduce network traffic to only consider only the rows you want to transfer. And you will avoid exporting to a file as the ‘reduction’ is kept inside the source server (does not involve file system or network).

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

Sidebar

Related Questions

For some testing code, I'd like to be able to host a WCF service
I'm using UnitTest++ for unit testing C++ code. In my tests, there's a group
I'm using the TPL but I'm finding it tricky unit testing code that uses
I am testing some code that does asynchronous processing using Grand Central Dispatch. The
I've recently come across some unit testing code that imports the modules to test
I'm testing code remotely on a Solaris machine through SSH Secure Shell using c++.
I write some testing code before using Proc::Daemon , what my testing code is
How are people unit testing code that uses Linq to SQL?
I am interested in your opinions on unit-testing code that uses Corba to communicate
I'm trying to be better about unit testing my code, but right now I'm

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.