and what does the create table and delete statement look like?
> --
> You received this message because you are subscribed to the Google
> Groups "H2 Database" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/h2-database/-/dovzhjPIkRAJ.
> To post to this group, send email to h2-da...@googlegroups.com.
> To unsubscribe from this group, send email to
> h2-database...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
Would it be possible to create an index as follows:
create index idx_TableA_k1_k2 on TableA(k1, k2)
and then delete 1000 rows at a time, until no more rows are found, using:
delete from TableA where K1='2012-01-01' and K2='ABC' limit 1000;
delete from TableA where K1='2012-01-01' and K2='ABC' limit 1000;
delete from TableA where K1='2012-01-01' and K2='ABC' limit 1000;
...
(until the updateCount is 0).
Regards,
Thomas
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/h2-database/-/e0ZR351D3_oJ.
That works much better. Now it only takes about 25 seconds to delete these 2 million records.
Thanks for the advice.