开发者

On a Youtube-like website, would it make sense to use individual sqlite files to store video comments? (One sqlite file per video.)

开发者 https://www.devze.com 2023-02-01 16:40 出处:网络
\"On a Youtube-like website, would it make sense to use individual sqlite files to store vi开发者_运维知识库deo comments?(One sqlite file per video.)\"

"On a Youtube-like website, would it make sense to use individual sqlite files to store vi开发者_运维知识库deo comments? (One sqlite file per video.)"

I'm curious to hear what anyone thinks.


The reopening of so many files and file handles at the OS level may cause a performance hit. I would let the database do what databases do best and just have a FK to the video ID for each comment.


As you've stated in the comments that you already have a MySQL database for videos, there's little sense in using SQLite for commenting. A comments table with a video_id column is going to be a lot more flexible.

SQLite also doesn't hold up too well in a situation where you might have concurrent writes, which commenting is.


It would make it impossible (or very difficult) to efficiently search all comments.

0

精彩评论

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

关注公众号