Hi there I have a primary key column which is INT, defined as:
create table receipt (id integer generated by default as identity, ..., primary key (id)); As you can see, it comes with a sequence which works fine, but the datatype is INT. I want this to be an IDENTITY column. When I issue this DDL against my 400k rows table, it takes an unfeasibly long time: ALTER TABLE RECEIPT ALTER COLUMN ID IDENTITY NOT NULL; This takes longer than 16 hours, after which my test harness gives up (60000 seconds). It's also not usable in production. While playing with widening the datatype beforehand, I observe this DDL takes similarly long: ALTER TABLE RECEIPT ALTER COLUMN ID BIGINT NOT NULL AUTO_INCREMENT; I plotted this behavior for 10k, 20k, 30k and 40k records to see the shape of the graph: Can anyone shed any light on why this DDL is taking so long? And how I might solve this? Thanks Rich -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
