Hi Noel

I used the trace.db output facility and got this:

alter table receipt drop primary key;
> alter table receipt alter column id identity not null;
> COMMIT;
> -----------------------------------------
> -- SQL Statement Statistics
> -- time: total time in milliseconds (accumulated)
> -- count: how many times the statement ran
> -- result: total update count or row count
> -----------------------------------------
> -- self accu    time   count  result sql
> -- 100% 100%   47505       1       0 alter table receipt alter column id 
> identity not null;
> --   0% 100%       0       1       0 COMMIT;
> --   0% 100%       0       1       0 alter table receipt drop primary key;
>
>
There's no triggers, custom table enginers, views etc. It's a really simply 
setup.

Cheers
Rich



On Monday, 25 February 2019 14:43:48 UTC, Noel Grandin wrote:
>
> That doesn't make any sense. I do similar transformations all the time, 
> and their running time is always roughly O(n). 
>
> H2 basically builds a new table with new data, and then drops the old 
> table and replaces it with the new. 
>
> I suspect you have some other code getting in the way somehow (e.g. 
> triggers, custom table engines, views, etc) 
>
> Try using some performance profiler to see where the time is going (e.g. 
> the very basic one built into H2 should be fine 
> for this job). 
>
> If that doesn't point you in the right direction, please construct a 
> minimal test case, and log a bug. 
>
>

-- 
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.

Reply via email to