Stream the file and write in batches — never materialise the whole thing.
ordered=False lets the server keep going past individual duplicate-key failures rather than aborting the batch. Drop secondary indexes before the load and rebuild them afterwards — maintaining them per-insert is usually the real bottleneck.