I have around 40 million rows in a MySQL table. I want to copy this table into another table of same database. What is the most efficient way to do this? How much time will it take (approx.)?
create table new_table as select * from Old_table;
when you copy data in this way all constraint are also copy in new table if you create table separate query and insert data through separate query constraint are not copied in new table