Insert into the select a, b, b, c from a;
The second way:
The alter table a drop the column b;
Insert into the select * from a b;
The faster? Why is that?
CodePudding user response:
Lz this article 641 w data, a method to use 353 + seconds, mode 2 with 190 + seconds, only solution, the second way to run the firstCodePudding user response:
Way for a fasterReason: the way the second drop column takes time, not a table of shrinking and the way the table section of the same size, that is they are using the same data block,
The original poster can be a more detailed description of a scene
CodePudding user response:
Sorry ah, now see, as a rule, I also think that a faster way, just met the phenomenon at that time, a little uncertain, to say the specific scene, is now often have table minus a few fields to get another one table, because the same library is thinking about writing SQL processing, may be I, the data quantity is less, have the opportunity to get a large quantity of data to test the