What's the fastest way to clone a big table in MonetDB?

41 Views Asked by At

I got a table of 300 millions rows (and 10 columns) and I want to clone it in the same server.

So far I've tried with

START TRANSACTION ISOLATION LEVEL SERIALIZABLE;
CREATE TABLE cloned_table AS (SELECT * FROM big_table);
COMMIT;

but, after calling COMMIT; MonetDB starts creating a huge transaction log blocking all other queries.

This is the status during the operation

Transaction size htop

As you can see the worst part is that MonetDB is using disk, even if there's a lot of free memory.

What would be the best approach??

0

There are 0 best solutions below