distal-attribute
distal-attribute
distal-attribute
distal-attribute

Use SQL to perform local export operations

djdjohnson posted 3 years ago in Feature discussion
Since you're resistant to providing a way to custom bulk table operations, would you at least consider this...

Right now we have the ability to export data from one database to another. One of the options on the export screen is to export to another database on the same server. But executing that option actually downloads the data to HeidiSQL, builds the SQL to insert it, then sends that SQL back up to the server to insert the rows that have been downloaded.

How about an option to perform the same operation but keep it entirely local to the server so the data doesn't have to be downloaded remotely.

So if we have database A and database B on the same server, database A contains tables D, E, and F... and we want to export those tables from database A to B, HeidiSQL would execute the three following SQL statements instead of downloading then uploading table data:

INSERT INTO B.D SELECT * FROM A.D;
INSERT INTO B.E SELECT * FROM A.E;
INSERT INTO B.F SELECT * FROM A.F;

The table structures would have to be identical for this to work, but if the 'Create' option is selected we know that is going to be true (or include field names from the destination table in the insert statement).

Doing it this way would make it go SO much faster.
ansgar posted 3 years ago
Man, you have good ideas for breaking stuff. Your idea looks attractive at least for the INSERT blocks. But that would break the ability of showing some progress on the result panel. On the other side displaying progress is less important than speed. So, why not.
ansgar posted 3 years ago
Hm, I'm examining my export code which is already ... too much. Reason is that HeidiSQL has a lot of different output options. I'm highly unhappy with code I cannot maintain any longer without breaking stuff.

Please login to leave a reply, or register at first.