开发者

Speed: Saved Objects vs Database

I am designing a dynamic site for some form of weather data, which I need to scrape to get the data, as its always changing. I am interested in knowing if its faster to use a database like sqlite or to sa开发者_如何学Cve objects ,reloading them whenever needed. Both options will hold the scraped data.

Likely will use Python or Ruby, haven't decided yet.


This depends on a huge number of factors.

If you need to query the data, and search through it, it's likely that using a database will be more efficient. They are highly optimized for this type of operation.

If, however, you're purely just trying to dump and reload a bunch of memory, it could be faster to save it directly to a file.

That being said, I'd look at how you're going to use the data, and choose the method that makes the most sense for your application. I would not base this on speed, as, unless you're saving a huge amount of data, the speed of saving the data will likely not be a real performance bottleneck.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜