Bug #7957 | Some way to make a copy of a table. | ||
---|---|---|---|
Submitted: | 17 Jan 2005 14:56 | Modified: | 25 Jun 2013 19:13 |
Reporter: | Hans-Henrik Stærfeldt | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: DDL | Severity: | S4 (Feature request) |
Version: | 4.1.5-gamma-20041010-log | OS: | Other (IRIX64 genome 6.5 04070317 IP35) |
Assigned to: | CPU Architecture: | Any |
[17 Jan 2005 14:56]
Hans-Henrik Stærfeldt
[25 Jan 2005 14:52]
Frank Mussmann
Try : create table t1 (Number int); insert into t1 values(1),(2),(3),(4),(5),(6); select * from t1; create table t2 select * from t1; select * from t2; Voila - a copy of table t1. (no Keys and Indices, but a copy is a copy ;-) ) Hope this helps.
[31 Jan 2005 10:37]
Hans-Henrik Stærfeldt
Thanks Frank, but as im saying, I need a copy _with_ the indexes, otherwise I could use the BACKUP command. Rebuilding a table with all the data and indexes would take me more than a day since I have more than 100million records and about 10GB of data. Copying the files raw takes about 10 minutes (using 'cp').
[25 Jun 2013 19:13]
Sveta Smirnova
Thank you for the reasonable feature request.