Hi Rob,
So each of the old rows splits into 30 new rows.
Really 180 rows, right?
The existing table has about 85000 rows, equating to over 15 million in the new structure. Ways I have tried end up creating massive queries or just hogging the server for absolutely ages - what is the best way to perform this update?
Doing it in a single query is possible, but not really feasible. How about 180 queries, generated by: for part in `seq 0 5`; do for col in `seq 1 30`; do echo "INSERT INTO new_event_data (event_id, index, p) " \ "SELECT event_id, (30*${part})+${col} as index, p${col} " \ "FROM old_event_data;" done done Regards, Jeremy -- Jeremy Cole MySQL Geek, Yahoo! Inc. Desk: 408 349 5104 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]