'Fastest CSV to MS SQL Server import

What is the best (the fastest) way to import huge CSV files to MS SQL Server?

I'm to that job so first I learned how to use Import Wizard Tool, but the speed is inappropriate for me, for example, importing CSV of 5GB and 60 millions rows took me around 12 hours. (My specific is that I have some long text fields in Russian so it needed to be converted to NVARCHAR(MAX) to be correctly visible and I guess it takes 90% of the time)

Tomorrow I learned Import-CSV command in PowerShell and started importing this file again for experiment, and it seems speed is the same.

I know also where is way to use BULK INSERT command in SQL Server (idk how to use it never did before)

Maybe someone can recommend me something else?

Additional question: does importing always upload full CSV to RAM? If I have 25GB CSV file and only 16GB RAM memory what can I do?

Conclusion: I have huge CSV's like 5-25GB, hundred millions rows, Russian language and lots of float/int numbers inside. What can you recommend me for importing it to MS SQL Server?

Thanks a lot!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source