Hi all I have a table with 400k records. The primary key is currently an INT as defined like this:
CREATE RECEIPT (id integer generated by default as identity, ...) PRIMARY KEY (ID) ... I want this column to be IDENTITY. I've tried the simplest way, and various similar approaches to this: ALTER TABLE ALTER COLUMN ID IDENTITY NOT NULL; (various things like dropping the primary key first, creating indexes, making this into a BIGINT first, adding auto_increment on afterwards, etc) But this leads to taking an infeasibly long time: longer than 16 hours before my test harness program gives up. There's not point recording how long it does take because it's not acceptable for use in my production. I've measured the time by hand using 10k, 20k, 30k, 40k records - see attached graph. Looks O(n2) or so to me. I've read about using EXPLAIN etc but these are for DML not DDL. Any ideas what's going on here? Or way to get my INT PK with sequence to an IDENTITY column (with sequence, of course)? Cheers 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.
