Best Database Options for Handling Large Data Imports?

0
8
Asked By CuriousCoder42 On

I'm a college student building a political mapping website that requires storage for about 5-10 million rows of data. I'm currently using Cloudflare D1 for my whole site, but I'm struggling with importing two large files—one is 120,000 KB and the other is 10.7 GB. The issue is that when I try to import the larger file, it times out, and I'm concerned about crashing the system. I'm seeking advice on whether I should stick with Cloudflare or consider switching to another platform for this task. Any tips for managing large data imports efficiently, especially for these file sizes?

5 Answers

Answered By DataWhizKid93 On

SQLite is a solid choice for handling data like this. It's lightweight and can manage the volume you’re dealing with pretty well.

You can also consider breaking down your import into smaller batches to make it easier to handle. It might just work better than trying to shove everything at once!

Answered By TechTribe23 On

For huge datasets, a dedicated database server is really beneficial. Running a database like MySQL or PostgreSQL on a VPS can be very affordable—think around $5-10/month.

If you don't mind a bit of work, try using a Docker container to run your chosen DB and process the data before uploading it directly to Cloudflare. This way, you avoid those timeout issues altogether!

Answered By PragmaticDev On

Cloudflare Workers might not be the best for massive imports since they are made for quick requests. Instead, consider running a temporary VPS just for your import process. You can install PostgreSQL there, import your data without worrying about timeouts, and then either keep using it or migrate the cleaned data back to Cloudflare.

Just be sure to split the 10 GB file into smaller chunks. That way if anything goes wrong, you won't have to start from scratch!

Answered By EfficientImporter On

I’d definitely preprocess your data locally. Since you're dealing with historical data that doesn’t need to be live, it makes sense to clean it up before uploading. Look into why you have 10 GB of it—is everything relevant? Trimming it down could save you a lot of headache down the line.

Answered By DBGuru88 On

Definitely look into PostgreSQL! It's my go-to for almost every database task. Plus, it handles big volumes like 10 GB without breaking a sweat. You can import your data as CSV files, and it should be straightforward.

Just make sure you format everything correctly before importing!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.