문제

I am trying to bulk-load a list of objects into a one-column (primary key) db. The only reason is to remove duplicates. I can't load the list in memory, because the file size is way greater than my memory size (I need around 10^14 insertions!).

I use monetdb's COPY-INTO command, but I don't want it to fail when there is a duplicate. I want it to add everything that is not a duplicate and skip the duplicates.

Is there any way to do that with monetdb? Any other way?

도움이 되었습니까?

해결책

You could copy it first into a table without primary key constraint and afterwards remove the duplicates and alter the table to enforce the primary key constraint.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top