Forum Discussion
Store 10000 Records in Collection
Hi All,
I want to store 10000 Records in collection From List. I tried many Codes. But it's Not working well.
Can you help me to solve this ?
2 Replies
- nexusleadCopper Contributor
It depends on the database you're using. For example, if you're using MongoDB and have a list of dictionaries, you can insert all 10,000 records efficiently using insert_many().
If you're facing performance issues, consider inserting data in batches (e.g., 1,000 at a time) to optimize memory usage.
Can you confirm your database type and data structure? That will help in providing a more precise solution.
I recently optimized a garage door repair service database, and batching made a huge difference in handling large datasets efficiently.
what database are you using ?
what format is the data in ( eg list of dictionaries ) ?
Do you want to insert all 10,000 records at once or batches ?
will check further once you respond above ?