Hi,

> As part of a database migration, I need to add a few columns to an
> existing table in production. It seems to be very slow adding columns
> to a table with 100K+ rows and 60 columns.

Yes, because internally the database re-creates the table and the
indexes. What you could do is create the the new table using a
different name, with all the columns, inserting all the data. Example:

create table test_new(id int primary key, a int, b int) as select id,
0, 0 from test;
create index...

I will add a feature request to speed up adding columns, but the
priority for this feature is low currently.

Regards,
Thomas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to