I have some folders having files, its count like 40Lac, 70Lac, 1Cr, 1.5cr... and filetype like .png, .xlsx, .txt, .msg, .ico, .jpg, .bmp etc...
Now I want to insert this filename into my database table with its size... but when I implement it takes too much time to scan the folder and then after it throws a memory exception.
can anyone please help me out here, how can I implement this scenario in a better manner?
how can insert faster in the table?
I am using C#.net with the PostgreSQL database...

Rijwan AnsariRank #82 · 24.2K reputationPosted Oct 16, 2021, 10:03 AM EDT
Srinivasan RamamoorthiRank #877 · 2.5K reputationPosted Oct 16, 2021, 8:42 AM EDT
Ankur Patel14 reputationPosted Oct 17, 2021, 2:04 PM EDT